{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "sys.path.append('..')\n",
    "from configure.settings import DBSelector"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def convertor(x):\n",
    "    try:\n",
    "        x=float(x)\n",
    "    except:\n",
    "        x=-9999\n",
    "    return x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "df['今年来']=df['今年来'].map(convertor)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "del df['布吉岛2']\n",
    "del df['布吉岛3']\n",
    "del df['布吉岛4']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [],
   "source": [
    "turnover_db = DBSelector().mongo('qq')['db_stock']['turnover_2021_12_15']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "doc_name = 'ttjj_rank_2024_01_19'\n",
    "rank_db = DBSelector().mongo('qq')['db_stock'][doc_name]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# rank\n",
    "result_list=[]\n",
    "for item in rank_db.find():\n",
    "    del item['_id']\n",
    "    result_list.append(item)\n",
    "rank_df = pd.DataFrame(result_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "14774"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>crawl_date</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>缩写</th>\n",
       "      <th>日期</th>\n",
       "      <th>单位净值</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>日增长率(%)</th>\n",
       "      <th>近1周增幅</th>\n",
       "      <th>...</th>\n",
       "      <th>成立来</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>购买手续费折扣</th>\n",
       "      <th>自定义</th>\n",
       "      <th>手续费原价？</th>\n",
       "      <th>手续费折后？</th>\n",
       "      <th>布吉岛1</th>\n",
       "      <th>布吉岛2</th>\n",
       "      <th>布吉岛3</th>\n",
       "      <th>布吉岛4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>指数</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>017116</td>\n",
       "      <td>浦银安盛中证光伏产业ETF联接A</td>\n",
       "      <td>PYASZZGFCYETFLJA</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>0.6113</td>\n",
       "      <td>0.6113</td>\n",
       "      <td>3.05</td>\n",
       "      <td>0.89</td>\n",
       "      <td>...</td>\n",
       "      <td>-38.87</td>\n",
       "      <td>2023-01-04</td>\n",
       "      <td>1</td>\n",
       "      <td>-38.9737</td>\n",
       "      <td>1.20%</td>\n",
       "      <td>0.12%</td>\n",
       "      <td>1</td>\n",
       "      <td>0.12%</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>指数</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>017117</td>\n",
       "      <td>浦银安盛中证光伏产业ETF联接C</td>\n",
       "      <td>PYASZZGFCYETFLJC</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>0.6089</td>\n",
       "      <td>0.6089</td>\n",
       "      <td>3.05</td>\n",
       "      <td>0.89</td>\n",
       "      <td>...</td>\n",
       "      <td>-39.11</td>\n",
       "      <td>2023-01-04</td>\n",
       "      <td>1</td>\n",
       "      <td>-39.2073</td>\n",
       "      <td></td>\n",
       "      <td>0.00%</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>指数</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>015299</td>\n",
       "      <td>华夏纳斯达克100ETF发起式联接(QDII)A</td>\n",
       "      <td>HXNSDK100ETFFQSLJQDIIA</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>1.305</td>\n",
       "      <td>1.305</td>\n",
       "      <td>1.39</td>\n",
       "      <td>1.33</td>\n",
       "      <td>...</td>\n",
       "      <td>30.5</td>\n",
       "      <td>2022-04-14</td>\n",
       "      <td>1</td>\n",
       "      <td>54.0550</td>\n",
       "      <td>1.20%</td>\n",
       "      <td>0.12%</td>\n",
       "      <td>1</td>\n",
       "      <td>0.12%</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>指数</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>015300</td>\n",
       "      <td>华夏纳斯达克100ETF发起式联接(QDII)C</td>\n",
       "      <td>HXNSDK100ETFFQSLJQDIIC</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>1.2982</td>\n",
       "      <td>1.2982</td>\n",
       "      <td>1.4</td>\n",
       "      <td>1.33</td>\n",
       "      <td>...</td>\n",
       "      <td>29.82</td>\n",
       "      <td>2022-04-14</td>\n",
       "      <td>1</td>\n",
       "      <td>53.6150</td>\n",
       "      <td></td>\n",
       "      <td>0.00%</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>指数</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>017091</td>\n",
       "      <td>景顺长城纳斯达克科技ETF联接(QDII)A人民币</td>\n",
       "      <td>JSCCNSDKKJETFLJQDIIARMB</td>\n",
       "      <td>2024-01-17</td>\n",
       "      <td>1.4879</td>\n",
       "      <td>1.4879</td>\n",
       "      <td>-0.64</td>\n",
       "      <td>0.94</td>\n",
       "      <td>...</td>\n",
       "      <td>48.79</td>\n",
       "      <td>2022-12-09</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td>1.20%</td>\n",
       "      <td>0.12%</td>\n",
       "      <td>1</td>\n",
       "      <td>0.12%</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  type  crawl_date    基金代码                       基金简称  \\\n",
       "0   指数  2024-01-19  017116           浦银安盛中证光伏产业ETF联接A   \n",
       "1   指数  2024-01-19  017117           浦银安盛中证光伏产业ETF联接C   \n",
       "2   指数  2024-01-19  015299   华夏纳斯达克100ETF发起式联接(QDII)A   \n",
       "3   指数  2024-01-19  015300   华夏纳斯达克100ETF发起式联接(QDII)C   \n",
       "4   指数  2024-01-19  017091  景顺长城纳斯达克科技ETF联接(QDII)A人民币   \n",
       "\n",
       "                        缩写          日期    单位净值    累计净值 日增长率(%) 近1周增幅  ...  \\\n",
       "0         PYASZZGFCYETFLJA  2024-01-18  0.6113  0.6113    3.05  0.89  ...   \n",
       "1         PYASZZGFCYETFLJC  2024-01-18  0.6089  0.6089    3.05  0.89  ...   \n",
       "2   HXNSDK100ETFFQSLJQDIIA  2024-01-18   1.305   1.305    1.39  1.33  ...   \n",
       "3   HXNSDK100ETFFQSLJQDIIC  2024-01-18  1.2982  1.2982     1.4  1.33  ...   \n",
       "4  JSCCNSDKKJETFLJQDIIARMB  2024-01-17  1.4879  1.4879   -0.64  0.94  ...   \n",
       "\n",
       "      成立来        成立日期 购买手续费折扣       自定义 手续费原价？ 手续费折后？ 布吉岛1   布吉岛2 布吉岛3 布吉岛4  \n",
       "0  -38.87  2023-01-04       1  -38.9737  1.20%  0.12%    1  0.12%    1       \n",
       "1  -39.11  2023-01-04       1  -39.2073         0.00%                        \n",
       "2    30.5  2022-04-14       1   54.0550  1.20%  0.12%    1  0.12%    1       \n",
       "3   29.82  2022-04-14       1   53.6150         0.00%                        \n",
       "4   48.79  2022-12-09       1            1.20%  0.12%    1  0.12%    1       \n",
       "\n",
       "[5 rows x 27 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>crawl_date</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>缩写</th>\n",
       "      <th>日期</th>\n",
       "      <th>单位净值</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>日增长率(%)</th>\n",
       "      <th>近1周增幅</th>\n",
       "      <th>...</th>\n",
       "      <th>成立来</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>购买手续费折扣</th>\n",
       "      <th>自定义</th>\n",
       "      <th>手续费原价？</th>\n",
       "      <th>手续费折后？</th>\n",
       "      <th>布吉岛1</th>\n",
       "      <th>布吉岛2</th>\n",
       "      <th>布吉岛3</th>\n",
       "      <th>布吉岛4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>0 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [type, crawl_date, 基金代码, 基金简称, 缩写, 日期, 单位净值, 累计净值, 日增长率(%), 近1周增幅, 近1月增幅, 近3月增幅, 近6月增幅, 近1年增幅, 近2年增幅, 近3年增幅, 今年来, 成立来, 成立日期, 购买手续费折扣, 自定义, 手续费原价？, 手续费折后？, 布吉岛1, 布吉岛2, 布吉岛3, 布吉岛4]\n",
       "Index: []\n",
       "\n",
       "[0 rows x 27 columns]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_df[rank_df.duplicated(['基金代码'])] # 查重"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_df = rank_df.sort_values(by='今年来',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "del rank_df['布吉岛1']\n",
    "del rank_df['布吉岛2']\n",
    "del rank_df['布吉岛3']\n",
    "del rank_df['布吉岛4']\n",
    "del rank_df['手续费原价？']\n",
    "del rank_df['手续费折后？']\n",
    "del rank_df['购买手续费折扣']\n",
    "del rank_df['自定义']\n",
    "del rank_df['缩写']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "del rank_df['crawl_date']\n",
    "# del rank_df['crawl_date']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>日期</th>\n",
       "      <th>单位净值</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>日增长率(%)</th>\n",
       "      <th>近1周增幅</th>\n",
       "      <th>近1月增幅</th>\n",
       "      <th>近3月增幅</th>\n",
       "      <th>近6月增幅</th>\n",
       "      <th>近1年增幅</th>\n",
       "      <th>近2年增幅</th>\n",
       "      <th>近3年增幅</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>成立日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2368</th>\n",
       "      <td>股票</td>\n",
       "      <td>006692</td>\n",
       "      <td>金信消费升级股票A</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>1.4183</td>\n",
       "      <td>2.1737</td>\n",
       "      <td>-0.29</td>\n",
       "      <td>1.6</td>\n",
       "      <td>4.25</td>\n",
       "      <td>4.49</td>\n",
       "      <td>-12.75</td>\n",
       "      <td>-18.71</td>\n",
       "      <td>-11.64</td>\n",
       "      <td>-8.18</td>\n",
       "      <td>5.31</td>\n",
       "      <td>121.63</td>\n",
       "      <td>2019-01-31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2369</th>\n",
       "      <td>股票</td>\n",
       "      <td>006693</td>\n",
       "      <td>金信消费升级股票C</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>1.4422</td>\n",
       "      <td>2.18</td>\n",
       "      <td>-0.29</td>\n",
       "      <td>1.58</td>\n",
       "      <td>4.18</td>\n",
       "      <td>4.28</td>\n",
       "      <td>-13.1</td>\n",
       "      <td>-19.36</td>\n",
       "      <td>-13.04</td>\n",
       "      <td>-10.35</td>\n",
       "      <td>5.27</td>\n",
       "      <td>113.09</td>\n",
       "      <td>2019-01-31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3291</th>\n",
       "      <td>混合</td>\n",
       "      <td>011134</td>\n",
       "      <td>广发价值优选混合A</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>0.8448</td>\n",
       "      <td>0.8448</td>\n",
       "      <td>0.15</td>\n",
       "      <td>2.18</td>\n",
       "      <td>4.85</td>\n",
       "      <td>0.68</td>\n",
       "      <td>-10.9</td>\n",
       "      <td>-14.32</td>\n",
       "      <td>-23.21</td>\n",
       "      <td></td>\n",
       "      <td>4.58</td>\n",
       "      <td>-15.52</td>\n",
       "      <td>2021-03-22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3292</th>\n",
       "      <td>混合</td>\n",
       "      <td>011135</td>\n",
       "      <td>广发价值优选混合C</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>0.8353</td>\n",
       "      <td>0.8353</td>\n",
       "      <td>0.16</td>\n",
       "      <td>2.18</td>\n",
       "      <td>4.82</td>\n",
       "      <td>0.59</td>\n",
       "      <td>-11.07</td>\n",
       "      <td>-14.66</td>\n",
       "      <td>-23.83</td>\n",
       "      <td></td>\n",
       "      <td>4.57</td>\n",
       "      <td>-16.47</td>\n",
       "      <td>2021-03-22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3293</th>\n",
       "      <td>混合</td>\n",
       "      <td>008297</td>\n",
       "      <td>广发价值优势混合</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>1.2613</td>\n",
       "      <td>1.2613</td>\n",
       "      <td>0.15</td>\n",
       "      <td>2.08</td>\n",
       "      <td>4.84</td>\n",
       "      <td>0.97</td>\n",
       "      <td>-10.69</td>\n",
       "      <td>-13.92</td>\n",
       "      <td>-23</td>\n",
       "      <td>-27.3</td>\n",
       "      <td>4.35</td>\n",
       "      <td>26.13</td>\n",
       "      <td>2020-03-02</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     type    基金代码       基金简称          日期    单位净值    累计净值 日增长率(%) 近1周增幅 近1月增幅  \\\n",
       "2368   股票  006692  金信消费升级股票A  2024-01-18  1.4183  2.1737   -0.29   1.6  4.25   \n",
       "2369   股票  006693  金信消费升级股票C  2024-01-18  1.4422    2.18   -0.29  1.58  4.18   \n",
       "3291   混合  011134  广发价值优选混合A  2024-01-18  0.8448  0.8448    0.15  2.18  4.85   \n",
       "3292   混合  011135  广发价值优选混合C  2024-01-18  0.8353  0.8353    0.16  2.18  4.82   \n",
       "3293   混合  008297   广发价值优势混合  2024-01-18  1.2613  1.2613    0.15  2.08  4.84   \n",
       "\n",
       "     近3月增幅   近6月增幅   近1年增幅   近2年增幅   近3年增幅   今年来     成立来        成立日期  \n",
       "2368  4.49  -12.75  -18.71  -11.64   -8.18  5.31  121.63  2019-01-31  \n",
       "2369  4.28   -13.1  -19.36  -13.04  -10.35  5.27  113.09  2019-01-31  \n",
       "3291  0.68   -10.9  -14.32  -23.21          4.58  -15.52  2021-03-22  \n",
       "3292  0.59  -11.07  -14.66  -23.83          4.57  -16.47  2021-03-22  \n",
       "3293  0.97  -10.69  -13.92     -23   -27.3  4.35   26.13  2020-03-02  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "14774"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_df['今年来'] = rank_df['今年来'].map(convertor)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2837"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_df[rank_df['今年来']>0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "type\n",
       "fof       32\n",
       "qdii      42\n",
       "债券      2106\n",
       "指数       372\n",
       "混合       261\n",
       "股票        24\n",
       "Name: 基金代码, dtype: int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "positive_fund = rank_df[rank_df['今年来']>0]\n",
    "positive_fund.groupby('type').count()['基金代码']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "type\n",
       "fof      813\n",
       "qdii     185\n",
       "债券      3211\n",
       "指数      2345\n",
       "混合      7250\n",
       "股票       922\n",
       "Name: 基金代码, dtype: int64"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_df_no_dup.groupby('type').count()['基金代码']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "48"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_df[rank_df['今年来']==-9999.0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_df_no_dup = rank_df[~(rank_df['今年来']==-9999.0)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "fof -2.43\n",
      "qdii -1.99\n",
      "债券 0.11\n",
      "指数 -5.0\n",
      "混合 -5.66\n",
      "股票 -7.06\n"
     ]
    }
   ],
   "source": [
    "for type,rows in rank_df_no_dup.groupby('type'):\n",
    "  print(type,round(rows['今年来'].median(),2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-9999.0"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_df[rank_df['type']=='qdii']['今年来'].min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>crawl_date</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>缩写</th>\n",
       "      <th>日期</th>\n",
       "      <th>单位净值</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>日增长率(%)</th>\n",
       "      <th>近1周增幅</th>\n",
       "      <th>...</th>\n",
       "      <th>成立来</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>购买手续费折扣</th>\n",
       "      <th>自定义</th>\n",
       "      <th>手续费原价？</th>\n",
       "      <th>手续费折后？</th>\n",
       "      <th>布吉岛1</th>\n",
       "      <th>布吉岛2</th>\n",
       "      <th>布吉岛3</th>\n",
       "      <th>布吉岛4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>10543</th>\n",
       "      <td>混合</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>020361</td>\n",
       "      <td>中海蓝筹混合C</td>\n",
       "      <td>ZHLCHHC</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>0.6547</td>\n",
       "      <td>0.6547</td>\n",
       "      <td>0.28</td>\n",
       "      <td>0.06</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.77</td>\n",
       "      <td>2024-01-04</td>\n",
       "      <td>1</td>\n",
       "      <td>-1.770443</td>\n",
       "      <td></td>\n",
       "      <td>0.00%</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2354</th>\n",
       "      <td>指数</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>019919</td>\n",
       "      <td>招商中证2000指数增强C</td>\n",
       "      <td>ZSZZ2000ZSZQC</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>0.975</td>\n",
       "      <td>0.975</td>\n",
       "      <td>-0.86</td>\n",
       "      <td>-3.55</td>\n",
       "      <td>...</td>\n",
       "      <td>-2.5</td>\n",
       "      <td>2024-01-02</td>\n",
       "      <td>1</td>\n",
       "      <td>-2.5</td>\n",
       "      <td></td>\n",
       "      <td>0.00%</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2353</th>\n",
       "      <td>指数</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>020104</td>\n",
       "      <td>易方达中证石化产业ETF联接发起式A</td>\n",
       "      <td>YFDZZSHCYETFLJFQSA</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>0.9732</td>\n",
       "      <td>0.9732</td>\n",
       "      <td>-0.01</td>\n",
       "      <td>-2.09</td>\n",
       "      <td>...</td>\n",
       "      <td>-2.68</td>\n",
       "      <td>2024-01-05</td>\n",
       "      <td>1</td>\n",
       "      <td>-2.67</td>\n",
       "      <td>1.20%</td>\n",
       "      <td>0.12%</td>\n",
       "      <td>1</td>\n",
       "      <td>0.12%</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2352</th>\n",
       "      <td>指数</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>019409</td>\n",
       "      <td>易方达中证港股通中国100ETF联接发起式C</td>\n",
       "      <td>YFDZZGGTZG100ETFLJFQSC</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>0.9478</td>\n",
       "      <td>0.9478</td>\n",
       "      <td>-0.84</td>\n",
       "      <td>-5.02</td>\n",
       "      <td>...</td>\n",
       "      <td>-5.22</td>\n",
       "      <td>2024-01-04</td>\n",
       "      <td>1</td>\n",
       "      <td>-4.42</td>\n",
       "      <td></td>\n",
       "      <td>0.00%</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14773</th>\n",
       "      <td>债券</td>\n",
       "      <td>2024-01-19</td>\n",
       "      <td>020605</td>\n",
       "      <td>长城稳健增利债券E</td>\n",
       "      <td>CCWJZLZQE</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>1.1328</td>\n",
       "      <td>1.1328</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>2024-01-18</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0.00%</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      type  crawl_date    基金代码                    基金简称  \\\n",
       "10543   混合  2024-01-19  020361                 中海蓝筹混合C   \n",
       "2354    指数  2024-01-19  019919           招商中证2000指数增强C   \n",
       "2353    指数  2024-01-19  020104      易方达中证石化产业ETF联接发起式A   \n",
       "2352    指数  2024-01-19  019409  易方达中证港股通中国100ETF联接发起式C   \n",
       "14773   债券  2024-01-19  020605               长城稳健增利债券E   \n",
       "\n",
       "                           缩写          日期    单位净值    累计净值 日增长率(%)  近1周增幅  ...  \\\n",
       "10543                 ZHLCHHC  2024-01-18  0.6547  0.6547    0.28   0.06  ...   \n",
       "2354            ZSZZ2000ZSZQC  2024-01-18   0.975   0.975   -0.86  -3.55  ...   \n",
       "2353       YFDZZSHCYETFLJFQSA  2024-01-19  0.9732  0.9732   -0.01  -2.09  ...   \n",
       "2352   YFDZZGGTZG100ETFLJFQSC  2024-01-19  0.9478  0.9478   -0.84  -5.02  ...   \n",
       "14773               CCWJZLZQE  2024-01-18  1.1328  1.1328                 ...   \n",
       "\n",
       "         成立来        成立日期 购买手续费折扣        自定义 手续费原价？ 手续费折后？ 布吉岛1   布吉岛2 布吉岛3  \\\n",
       "10543  -1.77  2024-01-04       1  -1.770443         0.00%                    \n",
       "2354    -2.5  2024-01-02       1       -2.5         0.00%                    \n",
       "2353   -2.68  2024-01-05       1      -2.67  1.20%  0.12%    1  0.12%    1   \n",
       "2352   -5.22  2024-01-04       1      -4.42         0.00%                    \n",
       "14773      0  2024-01-18       1          0         0.00%                    \n",
       "\n",
       "      布吉岛4  \n",
       "10543       \n",
       "2354        \n",
       "2353        \n",
       "2352        \n",
       "14773       \n",
       "\n",
       "[5 rows x 27 columns]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_df.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_df.to_excel('ttjj_rank_2024_01_19.xlsx',index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 换手率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\anaconda\\lib\\site-packages\\numpy\\core\\fromnumeric.py:3372: RuntimeWarning: Mean of empty slice.\n",
      "  return _methods._mean(a, axis=axis, dtype=dtype,\n",
      "C:\\anaconda\\lib\\site-packages\\numpy\\core\\_methods.py:170: RuntimeWarning: invalid value encountered in double_scalars\n",
      "  ret = ret.dtype.type(ret / rcount)\n"
     ]
    }
   ],
   "source": [
    "result_list=[]\n",
    "for item in turnover_db.find():\n",
    "    item_dict={}\n",
    "    item_dict['code']=item['code']\n",
    "    \n",
    "    rate_list = item['turnover_rate']\n",
    "    item_dict['kind']=item['kind']\n",
    "    turnover_num=None\n",
    "    sum_turnover=[]\n",
    "    for r in rate_list:\n",
    "        # r.get('REPORTDATE')=='2021-06-30':\n",
    "        turnover_num=r.get('STOCKTURNOVER')\n",
    "        sum_turnover.append(turnover_num)\n",
    "\n",
    "    t_mean=np.mean(sum_turnover)    \n",
    "    item_dict['turnover']=t_mean\n",
    "    result_list.append(item_dict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [],
   "source": [
    "turnover_rate_df = pd.DataFrame(result_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9600"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(turnover_rate_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "turnover_rate_df=turnover_rate_df[turnover_rate_df['turnover'].notnull()]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "set()"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "set(index_code)&set(stock_code)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_list=[]\n",
    "for item in rank_db.find({},{'_id':0}):\n",
    "    rank_list.append(item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_df = pd.DataFrame(rank_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11575"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_df_new=rank_df[(rank_df['type']=='股票')|(rank_df['type']=='混合')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7181"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_df_new)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>crawl_date</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>缩写</th>\n",
       "      <th>日期</th>\n",
       "      <th>单位净值</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>日增长率(%)</th>\n",
       "      <th>近1周增幅</th>\n",
       "      <th>...</th>\n",
       "      <th>成立来</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>购买手续费折扣</th>\n",
       "      <th>自定义</th>\n",
       "      <th>手续费原价？</th>\n",
       "      <th>手续费折后？</th>\n",
       "      <th>布吉岛1</th>\n",
       "      <th>布吉岛2</th>\n",
       "      <th>布吉岛3</th>\n",
       "      <th>布吉岛4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>0 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [type, crawl_date, 基金代码, 基金简称, 缩写, 日期, 单位净值, 累计净值, 日增长率(%), 近1周增幅, 近1月增幅, 近3月增幅, 近6月增幅, 近1年增幅, 近2年增幅, 近3年增幅, 今年来, 成立来, 成立日期, 购买手续费折扣, 自定义, 手续费原价？, 手续费折后？, 布吉岛1, 布吉岛2, 布吉岛3, 布吉岛4]\n",
       "Index: []\n",
       "\n",
       "[0 rows x 27 columns]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_df_new[rank_df_new.duplicated(['基金代码'])]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover = pd.merge(rank_df_new,turnover_rate_df,how='inner',left_on='基金代码',right_on='code')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7181"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_df_new)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4933"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(turnover_rate_df['code'].values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4933"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(set(turnover_rate_df['code'].values))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7181"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_fund_turnover_simple)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover_simple=rank_fund_turnover[['type','基金代码','基金简称','今年来','成立来','turnover','累计净值','成立日期']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>股票</td>\n",
       "      <td>005669</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>122.24</td>\n",
       "      <td>269.23</td>\n",
       "      <td>99.302857</td>\n",
       "      <td>3.6923</td>\n",
       "      <td>2018-03-23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>股票</td>\n",
       "      <td>004784</td>\n",
       "      <td>招商稳健优选股票</td>\n",
       "      <td>69.90</td>\n",
       "      <td>270.29</td>\n",
       "      <td>347.798750</td>\n",
       "      <td>3.7029</td>\n",
       "      <td>2017-09-20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>股票</td>\n",
       "      <td>000729</td>\n",
       "      <td>建信中小盘先锋股票A</td>\n",
       "      <td>67.22</td>\n",
       "      <td>322.40</td>\n",
       "      <td>534.246429</td>\n",
       "      <td>4.2240</td>\n",
       "      <td>2014-08-20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>股票</td>\n",
       "      <td>001245</td>\n",
       "      <td>工银生态环境股票</td>\n",
       "      <td>66.24</td>\n",
       "      <td>197.40</td>\n",
       "      <td>254.500000</td>\n",
       "      <td>2.9740</td>\n",
       "      <td>2015-06-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>股票</td>\n",
       "      <td>009147</td>\n",
       "      <td>建信新能源行业股票</td>\n",
       "      <td>65.94</td>\n",
       "      <td>186.84</td>\n",
       "      <td>178.655000</td>\n",
       "      <td>2.8684</td>\n",
       "      <td>2020-06-17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  type    基金代码        基金简称     今年来     成立来    turnover    累计净值        成立日期\n",
       "0   股票  005669  前海开源公用事业股票  122.24  269.23   99.302857  3.6923  2018-03-23\n",
       "1   股票  004784    招商稳健优选股票   69.90  270.29  347.798750  3.7029  2017-09-20\n",
       "2   股票  000729  建信中小盘先锋股票A   67.22  322.40  534.246429  4.2240  2014-08-20\n",
       "3   股票  001245    工银生态环境股票   66.24  197.40  254.500000  2.9740  2015-06-02\n",
       "4   股票  009147   建信新能源行业股票   65.94  186.84  178.655000  2.8684  2020-06-17"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "Int64Index: 7181 entries, 0 to 7180\n",
      "Data columns (total 8 columns):\n",
      " #   Column    Non-Null Count  Dtype  \n",
      "---  ------    --------------  -----  \n",
      " 0   type      7181 non-null   object \n",
      " 1   基金代码      7181 non-null   object \n",
      " 2   基金简称      7181 non-null   object \n",
      " 3   今年来       5381 non-null   float64\n",
      " 4   成立来       7181 non-null   float64\n",
      " 5   turnover  5587 non-null   float64\n",
      " 6   累计净值      7181 non-null   object \n",
      " 7   成立日期      7181 non-null   object \n",
      "dtypes: float64(3), object(5)\n",
      "memory usage: 504.9+ KB\n"
     ]
    }
   ],
   "source": [
    "rank_fund_turnover_simple.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-29-3a6386e959a2>:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  rank_fund_turnover_simple['今年来']=rank_fund_turnover_simple['今年来'].map(convertor)\n",
      "<ipython-input-29-3a6386e959a2>:2: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  rank_fund_turnover_simple['成立来']=rank_fund_turnover_simple['成立来'].map(convertor)\n"
     ]
    }
   ],
   "source": [
    "rank_fund_turnover_simple['今年来']=rank_fund_turnover_simple['今年来'].map(convertor)\n",
    "rank_fund_turnover_simple['成立来']=rank_fund_turnover_simple['成立来'].map(convertor)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "Int64Index: 5587 entries, 0 to 5586\n",
      "Data columns (total 7 columns):\n",
      " #   Column    Non-Null Count  Dtype  \n",
      "---  ------    --------------  -----  \n",
      " 0   type      5587 non-null   object \n",
      " 1   基金代码      5587 non-null   object \n",
      " 2   基金简称      5587 non-null   object \n",
      " 3   今年来       5587 non-null   float64\n",
      " 4   成立来       5587 non-null   float64\n",
      " 5   turnover  5587 non-null   float64\n",
      " 6   累计净值      5587 non-null   object \n",
      "dtypes: float64(3), object(4)\n",
      "memory usage: 349.2+ KB\n"
     ]
    }
   ],
   "source": [
    "rank_fund_turnover_simple.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "pd.set_option('display.max_rows',None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover_simple.sort_values(by='成立来',ascending=False).head(50).to_excel('1110.xlsx',encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count      50.000000\n",
       "mean      190.172400\n",
       "std       192.410815\n",
       "min        17.960000\n",
       "25%        79.732500\n",
       "50%       117.380000\n",
       "75%       243.692500\n",
       "max      1202.400000\n",
       "Name: turnover, dtype: float64"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple.sort_values(by='成立来',ascending=False).head(50)['turnover'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover_simple.sort_values(by='成立来',ascending=True).head(40)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover_simple.sort_values(by='成立来',ascending=True).head(50).to_excel('2220.xlsx',encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count     50.000000\n",
       "mean     232.557079\n",
       "std       84.453710\n",
       "min      106.232941\n",
       "25%      179.503714\n",
       "50%      220.323833\n",
       "75%      273.613534\n",
       "max      477.521562\n",
       "Name: turnover, dtype: float64"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple.sort_values(by='成立来',ascending=False).head(50)['turnover'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover_simple_new=rank_fund_turnover_simple[rank_fund_turnover_simple['今年来']!=-9999]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count     50.000000\n",
       "mean     138.607154\n",
       "std      113.426761\n",
       "min        9.865000\n",
       "25%       68.684148\n",
       "50%      112.135000\n",
       "75%      161.401111\n",
       "max      530.025833\n",
       "Name: turnover, dtype: float64"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple_new.sort_values(by='成立来',ascending=True).head(50)['turnover'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover_simple_new.sort_values(by='成立来',ascending=True).head(50).to_excel(\"3330.xlsx\",encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([882., 926., 762., 598., 490., 368., 272., 215., 129.,  84.,  68.,\n",
       "         53.,  52.,  18.,  30.,  16.,  17.,  10.,   5.,   5.,   2.,   6.,\n",
       "          2.,   0.,   1.,   0.,   2.,   1.,   0.,   0.,   0.,   0.,   2.,\n",
       "          0.,   0.,   0.,   0.,   0.,   0.,   2.,   0.,   0.,   0.,   0.,\n",
       "          0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,\n",
       "          0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,\n",
       "          0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,\n",
       "          0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,\n",
       "          0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,\n",
       "          2.]),\n",
       " array([2.65000000e-01, 6.16151944e+01, 1.22965389e+02, 1.84315583e+02,\n",
       "        2.45665778e+02, 3.07015972e+02, 3.68366167e+02, 4.29716361e+02,\n",
       "        4.91066556e+02, 5.52416750e+02, 6.13766944e+02, 6.75117139e+02,\n",
       "        7.36467333e+02, 7.97817528e+02, 8.59167722e+02, 9.20517917e+02,\n",
       "        9.81868111e+02, 1.04321831e+03, 1.10456850e+03, 1.16591869e+03,\n",
       "        1.22726889e+03, 1.28861908e+03, 1.34996928e+03, 1.41131947e+03,\n",
       "        1.47266967e+03, 1.53401986e+03, 1.59537006e+03, 1.65672025e+03,\n",
       "        1.71807044e+03, 1.77942064e+03, 1.84077083e+03, 1.90212103e+03,\n",
       "        1.96347122e+03, 2.02482142e+03, 2.08617161e+03, 2.14752181e+03,\n",
       "        2.20887200e+03, 2.27022219e+03, 2.33157239e+03, 2.39292258e+03,\n",
       "        2.45427278e+03, 2.51562297e+03, 2.57697317e+03, 2.63832336e+03,\n",
       "        2.69967356e+03, 2.76102375e+03, 2.82237394e+03, 2.88372414e+03,\n",
       "        2.94507433e+03, 3.00642453e+03, 3.06777472e+03, 3.12912492e+03,\n",
       "        3.19047511e+03, 3.25182531e+03, 3.31317550e+03, 3.37452569e+03,\n",
       "        3.43587589e+03, 3.49722608e+03, 3.55857628e+03, 3.61992647e+03,\n",
       "        3.68127667e+03, 3.74262686e+03, 3.80397706e+03, 3.86532725e+03,\n",
       "        3.92667744e+03, 3.98802764e+03, 4.04937783e+03, 4.11072803e+03,\n",
       "        4.17207822e+03, 4.23342842e+03, 4.29477861e+03, 4.35612881e+03,\n",
       "        4.41747900e+03, 4.47882919e+03, 4.54017939e+03, 4.60152958e+03,\n",
       "        4.66287978e+03, 4.72422997e+03, 4.78558017e+03, 4.84693036e+03,\n",
       "        4.90828056e+03, 4.96963075e+03, 5.03098094e+03, 5.09233114e+03,\n",
       "        5.15368133e+03, 5.21503153e+03, 5.27638172e+03, 5.33773192e+03,\n",
       "        5.39908211e+03, 5.46043231e+03, 5.52178250e+03, 5.58313269e+03,\n",
       "        5.64448289e+03, 5.70583308e+03, 5.76718328e+03, 5.82853347e+03,\n",
       "        5.88988367e+03, 5.95123386e+03, 6.01258406e+03, 6.07393425e+03,\n",
       "        6.13528444e+03]),\n",
       " <a list of 1 Patch objects>)"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "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",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.hist(rank_fund_turnover_simple_new['turnover'],bins=100,color='red',alpha=0.75)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count    5020.000000\n",
       "mean      238.652873\n",
       "std       244.260390\n",
       "min         0.265000\n",
       "25%        84.308583\n",
       "50%       178.617727\n",
       "75%       324.389722\n",
       "max      6135.284444\n",
       "Name: turnover, dtype: float64"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple_new['turnover'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3184"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple_new['turnover'].argmax()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "type                 混合\n",
       "基金代码             003373\n",
       "基金简称        大成景禄灵活配置混合A\n",
       "今年来                6.74\n",
       "成立来               52.61\n",
       "turnover        6135.28\n",
       "累计净值             1.5261\n",
       "Name: 3293, dtype: object"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple_new.iloc[3184]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover_simple_new.sort_values('turnover',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "t=rank_fund_turnover[['基金代码','成立日期']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "merge_df = pd.merge(rank_fund_turnover_simple_new,t,how='inner',left_on='基金代码',right_on='基金代码')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>股票</td>\n",
       "      <td>005669</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>122.24</td>\n",
       "      <td>269.23</td>\n",
       "      <td>99.302857</td>\n",
       "      <td>3.6923</td>\n",
       "      <td>2018-03-23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>股票</td>\n",
       "      <td>004784</td>\n",
       "      <td>招商稳健优选股票</td>\n",
       "      <td>69.90</td>\n",
       "      <td>270.29</td>\n",
       "      <td>347.798750</td>\n",
       "      <td>3.7029</td>\n",
       "      <td>2017-09-20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>股票</td>\n",
       "      <td>000729</td>\n",
       "      <td>建信中小盘先锋股票A</td>\n",
       "      <td>67.22</td>\n",
       "      <td>322.40</td>\n",
       "      <td>534.246429</td>\n",
       "      <td>4.2240</td>\n",
       "      <td>2014-08-20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>股票</td>\n",
       "      <td>001245</td>\n",
       "      <td>工银生态环境股票</td>\n",
       "      <td>66.24</td>\n",
       "      <td>197.40</td>\n",
       "      <td>254.500000</td>\n",
       "      <td>2.9740</td>\n",
       "      <td>2015-06-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>股票</td>\n",
       "      <td>009147</td>\n",
       "      <td>建信新能源行业股票</td>\n",
       "      <td>65.94</td>\n",
       "      <td>186.84</td>\n",
       "      <td>178.655000</td>\n",
       "      <td>2.8684</td>\n",
       "      <td>2020-06-17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  type    基金代码        基金简称     今年来     成立来    turnover    累计净值        成立日期\n",
       "0   股票  005669  前海开源公用事业股票  122.24  269.23   99.302857  3.6923  2018-03-23\n",
       "1   股票  004784    招商稳健优选股票   69.90  270.29  347.798750  3.7029  2017-09-20\n",
       "2   股票  000729  建信中小盘先锋股票A   67.22  322.40  534.246429  4.2240  2014-08-20\n",
       "3   股票  001245    工银生态环境股票   66.24  197.40  254.500000  2.9740  2015-06-02\n",
       "4   股票  009147   建信新能源行业股票   65.94  186.84  178.655000  2.8684  2020-06-17"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merge_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime\n",
    "now = datetime.datetime.now()\n",
    "\n",
    "def calc_year(x):\n",
    "    built_date = datetime.datetime.strptime(x,\"%Y-%m-%d\")\n",
    "    day=(now-built_date).days/365\n",
    "    return day\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_fund_turnover_simple_new"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.736986301369863"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "calc_year('2018-03-23')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-90-6c8e637e7e46>:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  rank_fund_turnover_simple['成立区间']=rank_fund_turnover_simple['成立日期'].map(calc_year)\n"
     ]
    }
   ],
   "source": [
    "rank_fund_turnover_simple['成立区间']=rank_fund_turnover_simple['成立日期'].map(calc_year)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>成立区间</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>股票</td>\n",
       "      <td>005669</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>122.24</td>\n",
       "      <td>269.23</td>\n",
       "      <td>99.302857</td>\n",
       "      <td>3.6923</td>\n",
       "      <td>2018-03-23</td>\n",
       "      <td>3.739726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>股票</td>\n",
       "      <td>004784</td>\n",
       "      <td>招商稳健优选股票</td>\n",
       "      <td>69.90</td>\n",
       "      <td>270.29</td>\n",
       "      <td>347.798750</td>\n",
       "      <td>3.7029</td>\n",
       "      <td>2017-09-20</td>\n",
       "      <td>4.243836</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>股票</td>\n",
       "      <td>000729</td>\n",
       "      <td>建信中小盘先锋股票A</td>\n",
       "      <td>67.22</td>\n",
       "      <td>322.40</td>\n",
       "      <td>534.246429</td>\n",
       "      <td>4.2240</td>\n",
       "      <td>2014-08-20</td>\n",
       "      <td>7.331507</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>股票</td>\n",
       "      <td>001245</td>\n",
       "      <td>工银生态环境股票</td>\n",
       "      <td>66.24</td>\n",
       "      <td>197.40</td>\n",
       "      <td>254.500000</td>\n",
       "      <td>2.9740</td>\n",
       "      <td>2015-06-02</td>\n",
       "      <td>6.547945</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>股票</td>\n",
       "      <td>009147</td>\n",
       "      <td>建信新能源行业股票</td>\n",
       "      <td>65.94</td>\n",
       "      <td>186.84</td>\n",
       "      <td>178.655000</td>\n",
       "      <td>2.8684</td>\n",
       "      <td>2020-06-17</td>\n",
       "      <td>1.501370</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  type    基金代码        基金简称     今年来     成立来    turnover    累计净值        成立日期  \\\n",
       "0   股票  005669  前海开源公用事业股票  122.24  269.23   99.302857  3.6923  2018-03-23   \n",
       "1   股票  004784    招商稳健优选股票   69.90  270.29  347.798750  3.7029  2017-09-20   \n",
       "2   股票  000729  建信中小盘先锋股票A   67.22  322.40  534.246429  4.2240  2014-08-20   \n",
       "3   股票  001245    工银生态环境股票   66.24  197.40  254.500000  2.9740  2015-06-02   \n",
       "4   股票  009147   建信新能源行业股票   65.94  186.84  178.655000  2.8684  2020-06-17   \n",
       "\n",
       "       成立区间  \n",
       "0  3.739726  \n",
       "1  4.243836  \n",
       "2  7.331507  \n",
       "3  6.547945  \n",
       "4  1.501370  "
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [],
   "source": [
    "merge_df['累计净值']=merge_df['累计净值'].astype(float)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>年化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>股票</td>\n",
       "      <td>005669</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>122.24</td>\n",
       "      <td>269.23</td>\n",
       "      <td>99.302857</td>\n",
       "      <td>3.6923</td>\n",
       "      <td>2018-03-23</td>\n",
       "      <td>0.720447</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>股票</td>\n",
       "      <td>004784</td>\n",
       "      <td>招商稳健优选股票</td>\n",
       "      <td>69.90</td>\n",
       "      <td>270.29</td>\n",
       "      <td>347.798750</td>\n",
       "      <td>3.7029</td>\n",
       "      <td>2017-09-20</td>\n",
       "      <td>0.637312</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>股票</td>\n",
       "      <td>000729</td>\n",
       "      <td>建信中小盘先锋股票A</td>\n",
       "      <td>67.22</td>\n",
       "      <td>322.40</td>\n",
       "      <td>534.246429</td>\n",
       "      <td>4.2240</td>\n",
       "      <td>2014-08-20</td>\n",
       "      <td>0.439910</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>股票</td>\n",
       "      <td>001245</td>\n",
       "      <td>工银生态环境股票</td>\n",
       "      <td>66.24</td>\n",
       "      <td>197.40</td>\n",
       "      <td>254.500000</td>\n",
       "      <td>2.9740</td>\n",
       "      <td>2015-06-02</td>\n",
       "      <td>0.301595</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>股票</td>\n",
       "      <td>009147</td>\n",
       "      <td>建信新能源行业股票</td>\n",
       "      <td>65.94</td>\n",
       "      <td>186.84</td>\n",
       "      <td>178.655000</td>\n",
       "      <td>2.8684</td>\n",
       "      <td>2020-06-17</td>\n",
       "      <td>1.246739</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  type    基金代码        基金简称     今年来     成立来    turnover    累计净值        成立日期  \\\n",
       "0   股票  005669  前海开源公用事业股票  122.24  269.23   99.302857  3.6923  2018-03-23   \n",
       "1   股票  004784    招商稳健优选股票   69.90  270.29  347.798750  3.7029  2017-09-20   \n",
       "2   股票  000729  建信中小盘先锋股票A   67.22  322.40  534.246429  4.2240  2014-08-20   \n",
       "3   股票  001245    工银生态环境股票   66.24  197.40  254.500000  2.9740  2015-06-02   \n",
       "4   股票  009147   建信新能源行业股票   65.94  186.84  178.655000  2.8684  2020-06-17   \n",
       "\n",
       "         年化  \n",
       "0  0.720447  \n",
       "1  0.637312  \n",
       "2  0.439910  \n",
       "3  0.301595  \n",
       "4  1.246739  "
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merge_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [],
   "source": [
    "def profit(x):\n",
    "    return (x['成立来']*0.01+1)**(1/x['成立区间'])-1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.41421356237309515"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "profit(2,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.9880999999999998"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(1+0.41)**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-93-42768c585b22>:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  rank_fund_turnover_simple['年化收益']=rank_fund_turnover_simple.apply(profit,axis=1)\n"
     ]
    }
   ],
   "source": [
    "rank_fund_turnover_simple['年化收益']=rank_fund_turnover_simple.apply(profit,axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>成立区间</th>\n",
       "      <th>年化收益</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>股票</td>\n",
       "      <td>005669</td>\n",
       "      <td>前海开源公用事业股票</td>\n",
       "      <td>122.24</td>\n",
       "      <td>269.23</td>\n",
       "      <td>99.302857</td>\n",
       "      <td>3.6923</td>\n",
       "      <td>2018-03-23</td>\n",
       "      <td>3.739726</td>\n",
       "      <td>0.418061</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>股票</td>\n",
       "      <td>004784</td>\n",
       "      <td>招商稳健优选股票</td>\n",
       "      <td>69.90</td>\n",
       "      <td>270.29</td>\n",
       "      <td>347.798750</td>\n",
       "      <td>3.7029</td>\n",
       "      <td>2017-09-20</td>\n",
       "      <td>4.243836</td>\n",
       "      <td>0.361347</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>股票</td>\n",
       "      <td>000729</td>\n",
       "      <td>建信中小盘先锋股票A</td>\n",
       "      <td>67.22</td>\n",
       "      <td>322.40</td>\n",
       "      <td>534.246429</td>\n",
       "      <td>4.2240</td>\n",
       "      <td>2014-08-20</td>\n",
       "      <td>7.331507</td>\n",
       "      <td>0.217159</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>股票</td>\n",
       "      <td>001245</td>\n",
       "      <td>工银生态环境股票</td>\n",
       "      <td>66.24</td>\n",
       "      <td>197.40</td>\n",
       "      <td>254.500000</td>\n",
       "      <td>2.9740</td>\n",
       "      <td>2015-06-02</td>\n",
       "      <td>6.547945</td>\n",
       "      <td>0.181105</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>股票</td>\n",
       "      <td>009147</td>\n",
       "      <td>建信新能源行业股票</td>\n",
       "      <td>65.94</td>\n",
       "      <td>186.84</td>\n",
       "      <td>178.655000</td>\n",
       "      <td>2.8684</td>\n",
       "      <td>2020-06-17</td>\n",
       "      <td>1.501370</td>\n",
       "      <td>1.017506</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  type    基金代码        基金简称     今年来     成立来    turnover    累计净值        成立日期  \\\n",
       "0   股票  005669  前海开源公用事业股票  122.24  269.23   99.302857  3.6923  2018-03-23   \n",
       "1   股票  004784    招商稳健优选股票   69.90  270.29  347.798750  3.7029  2017-09-20   \n",
       "2   股票  000729  建信中小盘先锋股票A   67.22  322.40  534.246429  4.2240  2014-08-20   \n",
       "3   股票  001245    工银生态环境股票   66.24  197.40  254.500000  2.9740  2015-06-02   \n",
       "4   股票  009147   建信新能源行业股票   65.94  186.84  178.655000  2.8684  2020-06-17   \n",
       "\n",
       "       成立区间      年化收益  \n",
       "0  3.739726  0.418061  \n",
       "1  4.243836  0.361347  \n",
       "2  7.331507  0.217159  \n",
       "3  6.547945  0.181105  \n",
       "4  1.501370  1.017506  "
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "merge_df.sort_values('年化收益',ascending=False).head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "merge_df.sort_values('turnover',ascending=False).head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>成立区间</th>\n",
       "      <th>年化收益</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>3293</th>\n",
       "      <td>混合</td>\n",
       "      <td>003373</td>\n",
       "      <td>大成景禄灵活配置混合A</td>\n",
       "      <td>6.74</td>\n",
       "      <td>52.61</td>\n",
       "      <td>6135.284444</td>\n",
       "      <td>1.5261</td>\n",
       "      <td>2016-09-29</td>\n",
       "      <td>5.219178</td>\n",
       "      <td>0.084363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3318</th>\n",
       "      <td>混合</td>\n",
       "      <td>003374</td>\n",
       "      <td>大成景禄灵活配置混合C</td>\n",
       "      <td>6.64</td>\n",
       "      <td>52.46</td>\n",
       "      <td>6135.284444</td>\n",
       "      <td>1.5246</td>\n",
       "      <td>2016-09-29</td>\n",
       "      <td>5.219178</td>\n",
       "      <td>0.084159</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4984</th>\n",
       "      <td>混合</td>\n",
       "      <td>007875</td>\n",
       "      <td>国融融兴混合A</td>\n",
       "      <td>-11.36</td>\n",
       "      <td>18.72</td>\n",
       "      <td>2415.220000</td>\n",
       "      <td>1.1872</td>\n",
       "      <td>2019-11-05</td>\n",
       "      <td>2.117808</td>\n",
       "      <td>0.084399</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4996</th>\n",
       "      <td>混合</td>\n",
       "      <td>007876</td>\n",
       "      <td>国融融兴混合C</td>\n",
       "      <td>-11.54</td>\n",
       "      <td>18.21</td>\n",
       "      <td>2415.220000</td>\n",
       "      <td>1.1821</td>\n",
       "      <td>2019-11-05</td>\n",
       "      <td>2.117808</td>\n",
       "      <td>0.082197</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1555</th>\n",
       "      <td>混合</td>\n",
       "      <td>005856</td>\n",
       "      <td>中科沃土沃瑞混合C</td>\n",
       "      <td>49.86</td>\n",
       "      <td>231.50</td>\n",
       "      <td>1995.410000</td>\n",
       "      <td>3.3150</td>\n",
       "      <td>2019-01-14</td>\n",
       "      <td>2.926027</td>\n",
       "      <td>0.506193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1554</th>\n",
       "      <td>混合</td>\n",
       "      <td>005855</td>\n",
       "      <td>中科沃土沃瑞混合A</td>\n",
       "      <td>50.29</td>\n",
       "      <td>235.41</td>\n",
       "      <td>1995.410000</td>\n",
       "      <td>3.3541</td>\n",
       "      <td>2019-01-14</td>\n",
       "      <td>2.926027</td>\n",
       "      <td>0.512241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2974</th>\n",
       "      <td>混合</td>\n",
       "      <td>003238</td>\n",
       "      <td>新华外延增长主题灵活配置混合</td>\n",
       "      <td>8.45</td>\n",
       "      <td>170.67</td>\n",
       "      <td>1666.887778</td>\n",
       "      <td>2.7067</td>\n",
       "      <td>2017-03-02</td>\n",
       "      <td>4.797260</td>\n",
       "      <td>0.230674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>220</th>\n",
       "      <td>股票</td>\n",
       "      <td>003647</td>\n",
       "      <td>创金合信中证1000指数增强C</td>\n",
       "      <td>23.09</td>\n",
       "      <td>71.82</td>\n",
       "      <td>1599.192222</td>\n",
       "      <td>1.7182</td>\n",
       "      <td>2016-12-22</td>\n",
       "      <td>4.989041</td>\n",
       "      <td>0.114597</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>215</th>\n",
       "      <td>股票</td>\n",
       "      <td>003646</td>\n",
       "      <td>创金合信中证1000指数增强A</td>\n",
       "      <td>23.32</td>\n",
       "      <td>73.81</td>\n",
       "      <td>1599.192222</td>\n",
       "      <td>1.7381</td>\n",
       "      <td>2016-12-22</td>\n",
       "      <td>4.989041</td>\n",
       "      <td>0.117173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3747</th>\n",
       "      <td>混合</td>\n",
       "      <td>004557</td>\n",
       "      <td>北信瑞丰鼎丰灵活配置混合</td>\n",
       "      <td>4.78</td>\n",
       "      <td>38.90</td>\n",
       "      <td>1491.363333</td>\n",
       "      <td>1.3890</td>\n",
       "      <td>2019-11-13</td>\n",
       "      <td>2.095890</td>\n",
       "      <td>0.169733</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>212</th>\n",
       "      <td>股票</td>\n",
       "      <td>003578</td>\n",
       "      <td>中金中证500C</td>\n",
       "      <td>23.44</td>\n",
       "      <td>74.59</td>\n",
       "      <td>1403.075556</td>\n",
       "      <td>1.8850</td>\n",
       "      <td>2016-11-28</td>\n",
       "      <td>5.054795</td>\n",
       "      <td>0.116553</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2139</th>\n",
       "      <td>混合</td>\n",
       "      <td>001897</td>\n",
       "      <td>九泰久盛量化先锋混合A</td>\n",
       "      <td>20.46</td>\n",
       "      <td>90.83</td>\n",
       "      <td>1396.054545</td>\n",
       "      <td>1.80</td>\n",
       "      <td>2015-11-10</td>\n",
       "      <td>6.106849</td>\n",
       "      <td>0.111619</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2185</th>\n",
       "      <td>混合</td>\n",
       "      <td>004510</td>\n",
       "      <td>九泰久盛量化先锋混合C</td>\n",
       "      <td>19.54</td>\n",
       "      <td>75.46</td>\n",
       "      <td>1333.495714</td>\n",
       "      <td>1.7530</td>\n",
       "      <td>2017-05-16</td>\n",
       "      <td>4.591781</td>\n",
       "      <td>0.130257</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>204</th>\n",
       "      <td>股票</td>\n",
       "      <td>003016</td>\n",
       "      <td>中金中证500A</td>\n",
       "      <td>23.92</td>\n",
       "      <td>89.68</td>\n",
       "      <td>1327.906000</td>\n",
       "      <td>1.8968</td>\n",
       "      <td>2016-07-22</td>\n",
       "      <td>5.408219</td>\n",
       "      <td>0.125660</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4826</th>\n",
       "      <td>混合</td>\n",
       "      <td>519157</td>\n",
       "      <td>新华行业灵活配置混合C</td>\n",
       "      <td>-6.84</td>\n",
       "      <td>109.42</td>\n",
       "      <td>1323.965000</td>\n",
       "      <td>2.0942</td>\n",
       "      <td>2015-08-01</td>\n",
       "      <td>6.383562</td>\n",
       "      <td>0.122763</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>657</th>\n",
       "      <td>股票</td>\n",
       "      <td>900029</td>\n",
       "      <td>中信证券量化优选A</td>\n",
       "      <td>6.44</td>\n",
       "      <td>55.86</td>\n",
       "      <td>1304.910000</td>\n",
       "      <td>2.3413</td>\n",
       "      <td>2020-05-22</td>\n",
       "      <td>1.572603</td>\n",
       "      <td>0.326043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>683</th>\n",
       "      <td>股票</td>\n",
       "      <td>900030</td>\n",
       "      <td>中信证券量化优选C</td>\n",
       "      <td>5.62</td>\n",
       "      <td>53.94</td>\n",
       "      <td>1304.910000</td>\n",
       "      <td>2.3247</td>\n",
       "      <td>2020-05-22</td>\n",
       "      <td>1.572603</td>\n",
       "      <td>0.315633</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3639</th>\n",
       "      <td>混合</td>\n",
       "      <td>005290</td>\n",
       "      <td>诺德新盛灵活配置混合A</td>\n",
       "      <td>5.32</td>\n",
       "      <td>61.84</td>\n",
       "      <td>1301.222857</td>\n",
       "      <td>1.6184</td>\n",
       "      <td>2017-12-20</td>\n",
       "      <td>3.994521</td>\n",
       "      <td>0.128088</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119</th>\n",
       "      <td>股票</td>\n",
       "      <td>005313</td>\n",
       "      <td>万家中证1000指数增强A</td>\n",
       "      <td>29.29</td>\n",
       "      <td>129.91</td>\n",
       "      <td>1233.062000</td>\n",
       "      <td>1.9696</td>\n",
       "      <td>2018-01-30</td>\n",
       "      <td>3.882192</td>\n",
       "      <td>0.239174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>126</th>\n",
       "      <td>股票</td>\n",
       "      <td>005314</td>\n",
       "      <td>万家中证1000指数增强C</td>\n",
       "      <td>28.80</td>\n",
       "      <td>125.07</td>\n",
       "      <td>1233.062000</td>\n",
       "      <td>1.9424</td>\n",
       "      <td>2018-01-30</td>\n",
       "      <td>3.882192</td>\n",
       "      <td>0.232402</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1900</th>\n",
       "      <td>混合</td>\n",
       "      <td>004890</td>\n",
       "      <td>中邮健康文娱混合</td>\n",
       "      <td>27.54</td>\n",
       "      <td>176.58</td>\n",
       "      <td>1219.864286</td>\n",
       "      <td>2.7658</td>\n",
       "      <td>2017-12-13</td>\n",
       "      <td>4.013699</td>\n",
       "      <td>0.288482</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1514</th>\n",
       "      <td>混合</td>\n",
       "      <td>001569</td>\n",
       "      <td>泰信国策驱动灵活配置混合</td>\n",
       "      <td>57.46</td>\n",
       "      <td>148.00</td>\n",
       "      <td>1189.890833</td>\n",
       "      <td>2.48</td>\n",
       "      <td>2015-10-27</td>\n",
       "      <td>6.145205</td>\n",
       "      <td>0.159280</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2433</th>\n",
       "      <td>混合</td>\n",
       "      <td>003516</td>\n",
       "      <td>国泰融安多策略灵活配置混合</td>\n",
       "      <td>14.83</td>\n",
       "      <td>270.10</td>\n",
       "      <td>1178.493750</td>\n",
       "      <td>3.7010</td>\n",
       "      <td>2017-07-03</td>\n",
       "      <td>4.460274</td>\n",
       "      <td>0.340967</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>423</th>\n",
       "      <td>股票</td>\n",
       "      <td>002311</td>\n",
       "      <td>创金合信中证500指数增强A</td>\n",
       "      <td>15.08</td>\n",
       "      <td>56.87</td>\n",
       "      <td>1175.434545</td>\n",
       "      <td>1.5553</td>\n",
       "      <td>2015-12-31</td>\n",
       "      <td>5.967123</td>\n",
       "      <td>0.078374</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>431</th>\n",
       "      <td>股票</td>\n",
       "      <td>002316</td>\n",
       "      <td>创金合信中证500指数增强C</td>\n",
       "      <td>14.97</td>\n",
       "      <td>56.92</td>\n",
       "      <td>1175.434545</td>\n",
       "      <td>1.5559</td>\n",
       "      <td>2015-12-31</td>\n",
       "      <td>5.967123</td>\n",
       "      <td>0.078432</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1693</th>\n",
       "      <td>混合</td>\n",
       "      <td>007469</td>\n",
       "      <td>中信建投精选混合C</td>\n",
       "      <td>36.85</td>\n",
       "      <td>116.23</td>\n",
       "      <td>1159.115000</td>\n",
       "      <td>2.1625</td>\n",
       "      <td>2019-11-29</td>\n",
       "      <td>2.052055</td>\n",
       "      <td>0.456163</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1682</th>\n",
       "      <td>混合</td>\n",
       "      <td>007468</td>\n",
       "      <td>中信建投精选混合A</td>\n",
       "      <td>37.39</td>\n",
       "      <td>118.03</td>\n",
       "      <td>1159.115000</td>\n",
       "      <td>2.1805</td>\n",
       "      <td>2019-11-29</td>\n",
       "      <td>2.052055</td>\n",
       "      <td>0.462058</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1472</th>\n",
       "      <td>混合</td>\n",
       "      <td>700003</td>\n",
       "      <td>平安策略先锋混合</td>\n",
       "      <td>77.61</td>\n",
       "      <td>625.44</td>\n",
       "      <td>1125.081111</td>\n",
       "      <td>6.73</td>\n",
       "      <td>2012-05-29</td>\n",
       "      <td>9.558904</td>\n",
       "      <td>0.230358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1804</th>\n",
       "      <td>混合</td>\n",
       "      <td>008348</td>\n",
       "      <td>中信建投甄选混合C</td>\n",
       "      <td>30.83</td>\n",
       "      <td>110.42</td>\n",
       "      <td>1118.505000</td>\n",
       "      <td>2.1042</td>\n",
       "      <td>2019-12-23</td>\n",
       "      <td>1.986301</td>\n",
       "      <td>0.454312</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1794</th>\n",
       "      <td>混合</td>\n",
       "      <td>008347</td>\n",
       "      <td>中信建投甄选混合A</td>\n",
       "      <td>31.33</td>\n",
       "      <td>112.10</td>\n",
       "      <td>1118.505000</td>\n",
       "      <td>2.1210</td>\n",
       "      <td>2019-12-23</td>\n",
       "      <td>1.986301</td>\n",
       "      <td>0.460146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>334</th>\n",
       "      <td>股票</td>\n",
       "      <td>006347</td>\n",
       "      <td>安信量化优选股票C</td>\n",
       "      <td>17.46</td>\n",
       "      <td>130.67</td>\n",
       "      <td>1091.676667</td>\n",
       "      <td>2.3067</td>\n",
       "      <td>2018-09-03</td>\n",
       "      <td>3.290411</td>\n",
       "      <td>0.289193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>325</th>\n",
       "      <td>股票</td>\n",
       "      <td>006346</td>\n",
       "      <td>安信量化优选股票A</td>\n",
       "      <td>17.91</td>\n",
       "      <td>133.37</td>\n",
       "      <td>1091.676667</td>\n",
       "      <td>2.3337</td>\n",
       "      <td>2018-09-03</td>\n",
       "      <td>3.290411</td>\n",
       "      <td>0.293760</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1991</th>\n",
       "      <td>混合</td>\n",
       "      <td>001978</td>\n",
       "      <td>泰信互联网+混合</td>\n",
       "      <td>24.23</td>\n",
       "      <td>130.70</td>\n",
       "      <td>1090.443000</td>\n",
       "      <td>2.3070</td>\n",
       "      <td>2016-06-08</td>\n",
       "      <td>5.528767</td>\n",
       "      <td>0.163229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1659</th>\n",
       "      <td>混合</td>\n",
       "      <td>002669</td>\n",
       "      <td>华商万众创新混合</td>\n",
       "      <td>38.90</td>\n",
       "      <td>216.00</td>\n",
       "      <td>1086.637000</td>\n",
       "      <td>3.16</td>\n",
       "      <td>2016-06-28</td>\n",
       "      <td>5.473973</td>\n",
       "      <td>0.233912</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1681</th>\n",
       "      <td>混合</td>\n",
       "      <td>002707</td>\n",
       "      <td>大摩科技领先混合</td>\n",
       "      <td>37.39</td>\n",
       "      <td>120.41</td>\n",
       "      <td>1085.390000</td>\n",
       "      <td>2.2041</td>\n",
       "      <td>2017-12-13</td>\n",
       "      <td>4.013699</td>\n",
       "      <td>0.217629</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4691</th>\n",
       "      <td>混合</td>\n",
       "      <td>000755</td>\n",
       "      <td>富安达新兴成长混合</td>\n",
       "      <td>-4.58</td>\n",
       "      <td>83.05</td>\n",
       "      <td>1076.657143</td>\n",
       "      <td>1.8305</td>\n",
       "      <td>2014-09-11</td>\n",
       "      <td>7.271233</td>\n",
       "      <td>0.086703</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1372</th>\n",
       "      <td>股票</td>\n",
       "      <td>010253</td>\n",
       "      <td>兴银中证500指数增强A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>16.29</td>\n",
       "      <td>1065.800000</td>\n",
       "      <td>1.1629</td>\n",
       "      <td>2021-03-01</td>\n",
       "      <td>0.797260</td>\n",
       "      <td>0.208397</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1373</th>\n",
       "      <td>股票</td>\n",
       "      <td>011205</td>\n",
       "      <td>兴银中证500指数增强C</td>\n",
       "      <td>NaN</td>\n",
       "      <td>16.05</td>\n",
       "      <td>1065.800000</td>\n",
       "      <td>1.1605</td>\n",
       "      <td>2021-03-01</td>\n",
       "      <td>0.797260</td>\n",
       "      <td>0.205269</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2059</th>\n",
       "      <td>混合</td>\n",
       "      <td>001224</td>\n",
       "      <td>中邮新思路灵活配置混合</td>\n",
       "      <td>22.09</td>\n",
       "      <td>276.90</td>\n",
       "      <td>1063.408182</td>\n",
       "      <td>3.7690</td>\n",
       "      <td>2015-11-11</td>\n",
       "      <td>6.104110</td>\n",
       "      <td>0.242796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2885</th>\n",
       "      <td>混合</td>\n",
       "      <td>519097</td>\n",
       "      <td>新华中小市值优选混合</td>\n",
       "      <td>9.14</td>\n",
       "      <td>398.83</td>\n",
       "      <td>1054.095714</td>\n",
       "      <td>4.2544</td>\n",
       "      <td>2011-01-28</td>\n",
       "      <td>10.893151</td>\n",
       "      <td>0.158971</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4686</th>\n",
       "      <td>混合</td>\n",
       "      <td>006274</td>\n",
       "      <td>圆信永丰医药健康</td>\n",
       "      <td>-4.50</td>\n",
       "      <td>48.50</td>\n",
       "      <td>1053.584000</td>\n",
       "      <td>1.4850</td>\n",
       "      <td>2018-11-29</td>\n",
       "      <td>3.052055</td>\n",
       "      <td>0.138324</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2628</th>\n",
       "      <td>混合</td>\n",
       "      <td>002919</td>\n",
       "      <td>东吴智慧医疗量化混合A</td>\n",
       "      <td>11.84</td>\n",
       "      <td>48.25</td>\n",
       "      <td>1044.617000</td>\n",
       "      <td>1.4825</td>\n",
       "      <td>2016-08-11</td>\n",
       "      <td>5.353425</td>\n",
       "      <td>0.076319</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1910</th>\n",
       "      <td>混合</td>\n",
       "      <td>002564</td>\n",
       "      <td>新沃通盈灵活配置混合</td>\n",
       "      <td>26.91</td>\n",
       "      <td>220.73</td>\n",
       "      <td>1040.850000</td>\n",
       "      <td>2.7270</td>\n",
       "      <td>2016-09-22</td>\n",
       "      <td>5.238356</td>\n",
       "      <td>0.249171</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4981</th>\n",
       "      <td>混合</td>\n",
       "      <td>002598</td>\n",
       "      <td>平安消费精选混合A</td>\n",
       "      <td>-11.20</td>\n",
       "      <td>6.76</td>\n",
       "      <td>1037.069000</td>\n",
       "      <td>1.0676</td>\n",
       "      <td>2016-06-08</td>\n",
       "      <td>5.528767</td>\n",
       "      <td>0.011902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5005</th>\n",
       "      <td>混合</td>\n",
       "      <td>002599</td>\n",
       "      <td>平安消费精选混合C</td>\n",
       "      <td>-11.72</td>\n",
       "      <td>5.40</td>\n",
       "      <td>1037.069000</td>\n",
       "      <td>1.0540</td>\n",
       "      <td>2016-06-08</td>\n",
       "      <td>5.528767</td>\n",
       "      <td>0.009558</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1583</th>\n",
       "      <td>混合</td>\n",
       "      <td>519115</td>\n",
       "      <td>浦银安盛红利精选混合A</td>\n",
       "      <td>46.97</td>\n",
       "      <td>358.39</td>\n",
       "      <td>1036.333636</td>\n",
       "      <td>4.5839</td>\n",
       "      <td>2009-12-03</td>\n",
       "      <td>12.046575</td>\n",
       "      <td>0.134723</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1709</th>\n",
       "      <td>混合</td>\n",
       "      <td>003822</td>\n",
       "      <td>中信建投轮换混合A</td>\n",
       "      <td>36.05</td>\n",
       "      <td>177.93</td>\n",
       "      <td>1035.320000</td>\n",
       "      <td>2.7793</td>\n",
       "      <td>2019-01-17</td>\n",
       "      <td>2.917808</td>\n",
       "      <td>0.419538</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1712</th>\n",
       "      <td>混合</td>\n",
       "      <td>003823</td>\n",
       "      <td>中信建投轮换混合C</td>\n",
       "      <td>35.51</td>\n",
       "      <td>174.70</td>\n",
       "      <td>1035.320000</td>\n",
       "      <td>2.7470</td>\n",
       "      <td>2019-01-17</td>\n",
       "      <td>2.917808</td>\n",
       "      <td>0.413862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1944</th>\n",
       "      <td>混合</td>\n",
       "      <td>004375</td>\n",
       "      <td>华泰保兴吉年丰混合发起C</td>\n",
       "      <td>25.90</td>\n",
       "      <td>225.74</td>\n",
       "      <td>1034.878889</td>\n",
       "      <td>3.0914</td>\n",
       "      <td>2017-03-24</td>\n",
       "      <td>4.736986</td>\n",
       "      <td>0.283127</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1932</th>\n",
       "      <td>混合</td>\n",
       "      <td>004374</td>\n",
       "      <td>华泰保兴吉年丰混合发起A</td>\n",
       "      <td>26.14</td>\n",
       "      <td>229.35</td>\n",
       "      <td>1034.878889</td>\n",
       "      <td>3.1251</td>\n",
       "      <td>2017-03-24</td>\n",
       "      <td>4.736986</td>\n",
       "      <td>0.286115</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     type    基金代码             基金简称    今年来     成立来     turnover    累计净值  \\\n",
       "3293   混合  003373      大成景禄灵活配置混合A   6.74   52.61  6135.284444  1.5261   \n",
       "3318   混合  003374      大成景禄灵活配置混合C   6.64   52.46  6135.284444  1.5246   \n",
       "4984   混合  007875          国融融兴混合A -11.36   18.72  2415.220000  1.1872   \n",
       "4996   混合  007876          国融融兴混合C -11.54   18.21  2415.220000  1.1821   \n",
       "1555   混合  005856        中科沃土沃瑞混合C  49.86  231.50  1995.410000  3.3150   \n",
       "1554   混合  005855        中科沃土沃瑞混合A  50.29  235.41  1995.410000  3.3541   \n",
       "2974   混合  003238   新华外延增长主题灵活配置混合   8.45  170.67  1666.887778  2.7067   \n",
       "220    股票  003647  创金合信中证1000指数增强C  23.09   71.82  1599.192222  1.7182   \n",
       "215    股票  003646  创金合信中证1000指数增强A  23.32   73.81  1599.192222  1.7381   \n",
       "3747   混合  004557     北信瑞丰鼎丰灵活配置混合   4.78   38.90  1491.363333  1.3890   \n",
       "212    股票  003578         中金中证500C  23.44   74.59  1403.075556  1.8850   \n",
       "2139   混合  001897      九泰久盛量化先锋混合A  20.46   90.83  1396.054545    1.80   \n",
       "2185   混合  004510      九泰久盛量化先锋混合C  19.54   75.46  1333.495714  1.7530   \n",
       "204    股票  003016         中金中证500A  23.92   89.68  1327.906000  1.8968   \n",
       "4826   混合  519157      新华行业灵活配置混合C  -6.84  109.42  1323.965000  2.0942   \n",
       "657    股票  900029        中信证券量化优选A   6.44   55.86  1304.910000  2.3413   \n",
       "683    股票  900030        中信证券量化优选C   5.62   53.94  1304.910000  2.3247   \n",
       "3639   混合  005290      诺德新盛灵活配置混合A   5.32   61.84  1301.222857  1.6184   \n",
       "119    股票  005313    万家中证1000指数增强A  29.29  129.91  1233.062000  1.9696   \n",
       "126    股票  005314    万家中证1000指数增强C  28.80  125.07  1233.062000  1.9424   \n",
       "1900   混合  004890         中邮健康文娱混合  27.54  176.58  1219.864286  2.7658   \n",
       "1514   混合  001569     泰信国策驱动灵活配置混合  57.46  148.00  1189.890833    2.48   \n",
       "2433   混合  003516    国泰融安多策略灵活配置混合  14.83  270.10  1178.493750  3.7010   \n",
       "423    股票  002311   创金合信中证500指数增强A  15.08   56.87  1175.434545  1.5553   \n",
       "431    股票  002316   创金合信中证500指数增强C  14.97   56.92  1175.434545  1.5559   \n",
       "1693   混合  007469        中信建投精选混合C  36.85  116.23  1159.115000  2.1625   \n",
       "1682   混合  007468        中信建投精选混合A  37.39  118.03  1159.115000  2.1805   \n",
       "1472   混合  700003         平安策略先锋混合  77.61  625.44  1125.081111    6.73   \n",
       "1804   混合  008348        中信建投甄选混合C  30.83  110.42  1118.505000  2.1042   \n",
       "1794   混合  008347        中信建投甄选混合A  31.33  112.10  1118.505000  2.1210   \n",
       "334    股票  006347        安信量化优选股票C  17.46  130.67  1091.676667  2.3067   \n",
       "325    股票  006346        安信量化优选股票A  17.91  133.37  1091.676667  2.3337   \n",
       "1991   混合  001978         泰信互联网+混合  24.23  130.70  1090.443000  2.3070   \n",
       "1659   混合  002669         华商万众创新混合  38.90  216.00  1086.637000    3.16   \n",
       "1681   混合  002707         大摩科技领先混合  37.39  120.41  1085.390000  2.2041   \n",
       "4691   混合  000755        富安达新兴成长混合  -4.58   83.05  1076.657143  1.8305   \n",
       "1372   股票  010253     兴银中证500指数增强A    NaN   16.29  1065.800000  1.1629   \n",
       "1373   股票  011205     兴银中证500指数增强C    NaN   16.05  1065.800000  1.1605   \n",
       "2059   混合  001224      中邮新思路灵活配置混合  22.09  276.90  1063.408182  3.7690   \n",
       "2885   混合  519097       新华中小市值优选混合   9.14  398.83  1054.095714  4.2544   \n",
       "4686   混合  006274         圆信永丰医药健康  -4.50   48.50  1053.584000  1.4850   \n",
       "2628   混合  002919      东吴智慧医疗量化混合A  11.84   48.25  1044.617000  1.4825   \n",
       "1910   混合  002564       新沃通盈灵活配置混合  26.91  220.73  1040.850000  2.7270   \n",
       "4981   混合  002598        平安消费精选混合A -11.20    6.76  1037.069000  1.0676   \n",
       "5005   混合  002599        平安消费精选混合C -11.72    5.40  1037.069000  1.0540   \n",
       "1583   混合  519115      浦银安盛红利精选混合A  46.97  358.39  1036.333636  4.5839   \n",
       "1709   混合  003822        中信建投轮换混合A  36.05  177.93  1035.320000  2.7793   \n",
       "1712   混合  003823        中信建投轮换混合C  35.51  174.70  1035.320000  2.7470   \n",
       "1944   混合  004375     华泰保兴吉年丰混合发起C  25.90  225.74  1034.878889  3.0914   \n",
       "1932   混合  004374     华泰保兴吉年丰混合发起A  26.14  229.35  1034.878889  3.1251   \n",
       "\n",
       "            成立日期       成立区间      年化收益  \n",
       "3293  2016-09-29   5.219178  0.084363  \n",
       "3318  2016-09-29   5.219178  0.084159  \n",
       "4984  2019-11-05   2.117808  0.084399  \n",
       "4996  2019-11-05   2.117808  0.082197  \n",
       "1555  2019-01-14   2.926027  0.506193  \n",
       "1554  2019-01-14   2.926027  0.512241  \n",
       "2974  2017-03-02   4.797260  0.230674  \n",
       "220   2016-12-22   4.989041  0.114597  \n",
       "215   2016-12-22   4.989041  0.117173  \n",
       "3747  2019-11-13   2.095890  0.169733  \n",
       "212   2016-11-28   5.054795  0.116553  \n",
       "2139  2015-11-10   6.106849  0.111619  \n",
       "2185  2017-05-16   4.591781  0.130257  \n",
       "204   2016-07-22   5.408219  0.125660  \n",
       "4826  2015-08-01   6.383562  0.122763  \n",
       "657   2020-05-22   1.572603  0.326043  \n",
       "683   2020-05-22   1.572603  0.315633  \n",
       "3639  2017-12-20   3.994521  0.128088  \n",
       "119   2018-01-30   3.882192  0.239174  \n",
       "126   2018-01-30   3.882192  0.232402  \n",
       "1900  2017-12-13   4.013699  0.288482  \n",
       "1514  2015-10-27   6.145205  0.159280  \n",
       "2433  2017-07-03   4.460274  0.340967  \n",
       "423   2015-12-31   5.967123  0.078374  \n",
       "431   2015-12-31   5.967123  0.078432  \n",
       "1693  2019-11-29   2.052055  0.456163  \n",
       "1682  2019-11-29   2.052055  0.462058  \n",
       "1472  2012-05-29   9.558904  0.230358  \n",
       "1804  2019-12-23   1.986301  0.454312  \n",
       "1794  2019-12-23   1.986301  0.460146  \n",
       "334   2018-09-03   3.290411  0.289193  \n",
       "325   2018-09-03   3.290411  0.293760  \n",
       "1991  2016-06-08   5.528767  0.163229  \n",
       "1659  2016-06-28   5.473973  0.233912  \n",
       "1681  2017-12-13   4.013699  0.217629  \n",
       "4691  2014-09-11   7.271233  0.086703  \n",
       "1372  2021-03-01   0.797260  0.208397  \n",
       "1373  2021-03-01   0.797260  0.205269  \n",
       "2059  2015-11-11   6.104110  0.242796  \n",
       "2885  2011-01-28  10.893151  0.158971  \n",
       "4686  2018-11-29   3.052055  0.138324  \n",
       "2628  2016-08-11   5.353425  0.076319  \n",
       "1910  2016-09-22   5.238356  0.249171  \n",
       "4981  2016-06-08   5.528767  0.011902  \n",
       "5005  2016-06-08   5.528767  0.009558  \n",
       "1583  2009-12-03  12.046575  0.134723  \n",
       "1709  2019-01-17   2.917808  0.419538  \n",
       "1712  2019-01-17   2.917808  0.413862  \n",
       "1944  2017-03-24   4.736986  0.283127  \n",
       "1932  2017-03-24   4.736986  0.286115  "
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple_new.sort_values('turnover',ascending=False).head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_remove_AC = rank_fund_turnover_simple.copy() # 移除了AC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [],
   "source": [
    "def split_AC(x):\n",
    "    if x.endswith(('A','C')):\n",
    "        x=x[:-1]\n",
    "    return x\n",
    "\n",
    "rank_remove_AC['parent']=rank_remove_AC['基金简称'].map(split_AC)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [],
   "source": [
    "def split_C(x):\n",
    "    if x.endswith('C'):\n",
    "        return 'C'\n",
    "    return None\n",
    "\n",
    "rank_remove_AC['isC']=rank_remove_AC['基金简称'].map(split_C)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "rank_remove_AC.sort_values('turnover',ascending=False).head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC = rank_remove_AC.copy()\n",
    "       "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [],
   "source": [
    "for index,row in rank_remove_AC[rank_remove_AC['isC']=='C'].iterrows():\n",
    "\n",
    "    parent = row['parent']\n",
    "    if len(rank_remove_AC[rank_remove_AC['parent']==parent])>1:\n",
    "\n",
    "        result_rank_remove_AC=result_rank_remove_AC.drop(index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC.sort_values('turnover',ascending=False).head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4708"
      ]
     },
     "execution_count": 100,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(result_rank_remove_AC)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "type                  股票\n",
       "基金代码              005928\n",
       "基金简称        创金合信新能源汽车股票C\n",
       "今年来                 61.3\n",
       "成立来                241.4\n",
       "turnover         543.763\n",
       "累计净值              3.4140\n",
       "成立日期          2018-05-08\n",
       "成立区间              3.6137\n",
       "年化收益            0.404647\n",
       "parent       创金合信新能源汽车股票\n",
       "isC                    C\n",
       "Name: 8, dtype: object"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_remove_AC.iloc[8]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC.sort_values('成立来',ascending=True).head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC_simple=result_rank_remove_AC[['type',\t'基金代码',\t'基金简称',\t'今年来',\t'成立来',\t'turnover',\t'累计净值',\t'成立日期',\t'年化收益']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC_simple.sort_values('turnover',ascending=False).tail(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>成立区间</th>\n",
       "      <th>年化收益</th>\n",
       "      <th>parent</th>\n",
       "      <th>isC</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [type, 基金代码, 基金简称, 今年来, 成立来, turnover, 累计净值, 成立日期, 成立区间, 年化收益, parent, isC]\n",
       "Index: []"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_rank_remove_AC[result_rank_remove_AC['基金简称']=='华安证券汇赢增利一年持有混合A']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>年化收益</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>3607.000000</td>\n",
       "      <td>3924.000000</td>\n",
       "      <td>3924.000000</td>\n",
       "      <td>3924.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>10.315403</td>\n",
       "      <td>148.231598</td>\n",
       "      <td>240.080724</td>\n",
       "      <td>0.145564</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>16.027595</td>\n",
       "      <td>278.785779</td>\n",
       "      <td>227.790755</td>\n",
       "      <td>0.144417</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>-31.420000</td>\n",
       "      <td>-72.250000</td>\n",
       "      <td>0.750000</td>\n",
       "      <td>-0.285147</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>0.230000</td>\n",
       "      <td>30.752500</td>\n",
       "      <td>88.540833</td>\n",
       "      <td>0.072731</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>6.930000</td>\n",
       "      <td>73.140000</td>\n",
       "      <td>185.838500</td>\n",
       "      <td>0.125865</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>17.400000</td>\n",
       "      <td>161.292500</td>\n",
       "      <td>326.658389</td>\n",
       "      <td>0.197252</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>122.240000</td>\n",
       "      <td>9223.380000</td>\n",
       "      <td>6135.284444</td>\n",
       "      <td>4.742858</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               今年来          成立来     turnover         年化收益\n",
       "count  3607.000000  3924.000000  3924.000000  3924.000000\n",
       "mean     10.315403   148.231598   240.080724     0.145564\n",
       "std      16.027595   278.785779   227.790755     0.144417\n",
       "min     -31.420000   -72.250000     0.750000    -0.285147\n",
       "25%       0.230000    30.752500    88.540833     0.072731\n",
       "50%       6.930000    73.140000   185.838500     0.125865\n",
       "75%      17.400000   161.292500   326.658389     0.197252\n",
       "max     122.240000  9223.380000  6135.284444     4.742858"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_rank_remove_AC_simple.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3924"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_fund_turnover_simple)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5587"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(rank_remove_AC)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC_simple.sort_values('成立来',ascending=False).head(50).to_excel('4441.xlsx',encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-107-821d755b8eb3>:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  result_rank_remove_AC_simple['年化收益']=result_rank_remove_AC_simple['年化收益']*100\n"
     ]
    }
   ],
   "source": [
    "result_rank_remove_AC_simple['年化收益']=result_rank_remove_AC_simple['年化收益']*100"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>年化收益</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>50.000000</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>50.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>10.549200</td>\n",
       "      <td>1754.962000</td>\n",
       "      <td>232.557079</td>\n",
       "      <td>26.777715</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>16.301332</td>\n",
       "      <td>1200.010311</td>\n",
       "      <td>84.453710</td>\n",
       "      <td>64.611754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>-11.430000</td>\n",
       "      <td>1140.290000</td>\n",
       "      <td>106.232941</td>\n",
       "      <td>14.492094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>-0.727500</td>\n",
       "      <td>1253.312500</td>\n",
       "      <td>179.503714</td>\n",
       "      <td>16.208983</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>7.285000</td>\n",
       "      <td>1396.155000</td>\n",
       "      <td>220.323833</td>\n",
       "      <td>17.516235</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>16.197500</td>\n",
       "      <td>1897.947500</td>\n",
       "      <td>273.613534</td>\n",
       "      <td>18.739220</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>59.300000</td>\n",
       "      <td>9223.380000</td>\n",
       "      <td>477.521562</td>\n",
       "      <td>474.285794</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             今年来          成立来    turnover        年化收益\n",
       "count  50.000000    50.000000   50.000000   50.000000\n",
       "mean   10.549200  1754.962000  232.557079   26.777715\n",
       "std    16.301332  1200.010311   84.453710   64.611754\n",
       "min   -11.430000  1140.290000  106.232941   14.492094\n",
       "25%    -0.727500  1253.312500  179.503714   16.208983\n",
       "50%     7.285000  1396.155000  220.323833   17.516235\n",
       "75%    16.197500  1897.947500  273.613534   18.739220\n",
       "max    59.300000  9223.380000  477.521562  474.285794"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_rank_remove_AC_simple.sort_values('成立来',ascending=False).head(50).describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC_simple.sort_values('成立来',ascending=True).head(50).to_excel('4442.xlsx',encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4708"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(result_rank_remove_AC_simple)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [type, 基金代码, 基金简称, 今年来, 成立来, turnover, 累计净值, 成立日期]\n",
       "Index: []"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_fund_turnover_simple[rank_fund_turnover_simple['今年来']==-9999]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>年化收益</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1031</th>\n",
       "      <td>股票</td>\n",
       "      <td>164818</td>\n",
       "      <td>工银中证传媒指数(LOF)A</td>\n",
       "      <td>-2.01</td>\n",
       "      <td>-72.25</td>\n",
       "      <td>103.285000</td>\n",
       "      <td>0.2898</td>\n",
       "      <td>2015-05-21</td>\n",
       "      <td>-17.699954</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>720</th>\n",
       "      <td>股票</td>\n",
       "      <td>160639</td>\n",
       "      <td>鹏华中证高铁产业指数(LOF)</td>\n",
       "      <td>5.34</td>\n",
       "      <td>-62.43</td>\n",
       "      <td>210.740833</td>\n",
       "      <td>0.38</td>\n",
       "      <td>2015-05-27</td>\n",
       "      <td>-13.854522</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>744</th>\n",
       "      <td>股票</td>\n",
       "      <td>160135</td>\n",
       "      <td>南方中证高铁产业指数(LOF)</td>\n",
       "      <td>4.80</td>\n",
       "      <td>-54.22</td>\n",
       "      <td>67.665833</td>\n",
       "      <td>1.0137</td>\n",
       "      <td>2015-06-10</td>\n",
       "      <td>-11.283484</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>290</th>\n",
       "      <td>股票</td>\n",
       "      <td>162413</td>\n",
       "      <td>华宝中证1000指数</td>\n",
       "      <td>20.19</td>\n",
       "      <td>-50.22</td>\n",
       "      <td>62.909167</td>\n",
       "      <td>0.4850</td>\n",
       "      <td>2015-06-04</td>\n",
       "      <td>-10.113271</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>538</th>\n",
       "      <td>股票</td>\n",
       "      <td>161123</td>\n",
       "      <td>易方达中证万得并购重组(LOF)</td>\n",
       "      <td>11.27</td>\n",
       "      <td>-45.25</td>\n",
       "      <td>190.600000</td>\n",
       "      <td>0.5358</td>\n",
       "      <td>2015-06-03</td>\n",
       "      <td>-8.792745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>股票</td>\n",
       "      <td>168203</td>\n",
       "      <td>中融国证钢铁行业指数(LOF)</td>\n",
       "      <td>45.16</td>\n",
       "      <td>-42.13</td>\n",
       "      <td>245.194167</td>\n",
       "      <td>1.35</td>\n",
       "      <td>2015-06-19</td>\n",
       "      <td>-8.068979</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>315</th>\n",
       "      <td>股票</td>\n",
       "      <td>164908</td>\n",
       "      <td>交银中证环境治理(LOF)A</td>\n",
       "      <td>18.90</td>\n",
       "      <td>-41.62</td>\n",
       "      <td>75.400000</td>\n",
       "      <td>0.5838</td>\n",
       "      <td>2015-08-13</td>\n",
       "      <td>-8.125463</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>934</th>\n",
       "      <td>股票</td>\n",
       "      <td>165523</td>\n",
       "      <td>信诚中证信息安全指数(LOF)A</td>\n",
       "      <td>-0.32</td>\n",
       "      <td>-39.21</td>\n",
       "      <td>60.851667</td>\n",
       "      <td>0.6175</td>\n",
       "      <td>2015-06-26</td>\n",
       "      <td>-7.391246</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4839</th>\n",
       "      <td>混合</td>\n",
       "      <td>001239</td>\n",
       "      <td>长盛国企改革混合</td>\n",
       "      <td>1.56</td>\n",
       "      <td>-35.10</td>\n",
       "      <td>390.284167</td>\n",
       "      <td>0.6490</td>\n",
       "      <td>2015-06-04</td>\n",
       "      <td>-6.394351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>715</th>\n",
       "      <td>股票</td>\n",
       "      <td>502013</td>\n",
       "      <td>长盛中证申万一带一路指数(LOF)</td>\n",
       "      <td>5.39</td>\n",
       "      <td>-34.49</td>\n",
       "      <td>66.969167</td>\n",
       "      <td>1.4976</td>\n",
       "      <td>2015-05-29</td>\n",
       "      <td>-6.245217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>261</th>\n",
       "      <td>股票</td>\n",
       "      <td>501030</td>\n",
       "      <td>汇添富中证环境治理指数A</td>\n",
       "      <td>21.37</td>\n",
       "      <td>-33.22</td>\n",
       "      <td>161.401111</td>\n",
       "      <td>0.6678</td>\n",
       "      <td>2016-12-29</td>\n",
       "      <td>-7.803037</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>622</th>\n",
       "      <td>股票</td>\n",
       "      <td>165524</td>\n",
       "      <td>信诚中证智能家居指数(LOF)A</td>\n",
       "      <td>8.41</td>\n",
       "      <td>-33.04</td>\n",
       "      <td>75.330833</td>\n",
       "      <td>0.6571</td>\n",
       "      <td>2015-06-26</td>\n",
       "      <td>-5.999805</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>251</th>\n",
       "      <td>股票</td>\n",
       "      <td>160420</td>\n",
       "      <td>华安创业板50指数</td>\n",
       "      <td>21.89</td>\n",
       "      <td>-31.02</td>\n",
       "      <td>141.605000</td>\n",
       "      <td>0.6898</td>\n",
       "      <td>2015-07-06</td>\n",
       "      <td>-5.590779</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>698</th>\n",
       "      <td>股票</td>\n",
       "      <td>161030</td>\n",
       "      <td>富国中证体育产业指数(LOF)A</td>\n",
       "      <td>5.74</td>\n",
       "      <td>-30.46</td>\n",
       "      <td>104.700000</td>\n",
       "      <td>0.6870</td>\n",
       "      <td>2015-06-25</td>\n",
       "      <td>-5.447718</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1009</th>\n",
       "      <td>股票</td>\n",
       "      <td>161027</td>\n",
       "      <td>富国中证全指证券公司指数(LOF)A</td>\n",
       "      <td>-1.67</td>\n",
       "      <td>-29.34</td>\n",
       "      <td>91.835385</td>\n",
       "      <td>0.6580</td>\n",
       "      <td>2015-03-27</td>\n",
       "      <td>-5.028354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1076</th>\n",
       "      <td>股票</td>\n",
       "      <td>001899</td>\n",
       "      <td>东海社会安全</td>\n",
       "      <td>-2.87</td>\n",
       "      <td>-29.00</td>\n",
       "      <td>71.739091</td>\n",
       "      <td>0.71</td>\n",
       "      <td>2015-11-23</td>\n",
       "      <td>-5.485033</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1370</th>\n",
       "      <td>股票</td>\n",
       "      <td>162412</td>\n",
       "      <td>华宝医疗ETF联接A</td>\n",
       "      <td>-13.86</td>\n",
       "      <td>-27.86</td>\n",
       "      <td>104.158333</td>\n",
       "      <td>0.6909</td>\n",
       "      <td>2015-05-21</td>\n",
       "      <td>-4.841209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>414</th>\n",
       "      <td>股票</td>\n",
       "      <td>001241</td>\n",
       "      <td>国寿安保中证500ETF联接</td>\n",
       "      <td>15.52</td>\n",
       "      <td>-27.68</td>\n",
       "      <td>30.693000</td>\n",
       "      <td>0.7233</td>\n",
       "      <td>2015-05-29</td>\n",
       "      <td>-4.820832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1134</th>\n",
       "      <td>股票</td>\n",
       "      <td>160629</td>\n",
       "      <td>鹏华中证传媒指数(LOF)</td>\n",
       "      <td>-4.37</td>\n",
       "      <td>-27.65</td>\n",
       "      <td>163.759231</td>\n",
       "      <td>1.2140</td>\n",
       "      <td>2014-12-11</td>\n",
       "      <td>-4.504597</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1021</th>\n",
       "      <td>股票</td>\n",
       "      <td>160633</td>\n",
       "      <td>鹏华券商A</td>\n",
       "      <td>-1.89</td>\n",
       "      <td>-27.46</td>\n",
       "      <td>130.608333</td>\n",
       "      <td>0.6790</td>\n",
       "      <td>2015-05-06</td>\n",
       "      <td>-4.732382</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1400</th>\n",
       "      <td>股票</td>\n",
       "      <td>006816</td>\n",
       "      <td>泰康港股通地产指数A</td>\n",
       "      <td>-20.16</td>\n",
       "      <td>-26.95</td>\n",
       "      <td>127.834000</td>\n",
       "      <td>0.7305</td>\n",
       "      <td>2019-01-29</td>\n",
       "      <td>-10.313545</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1037</th>\n",
       "      <td>股票</td>\n",
       "      <td>161720</td>\n",
       "      <td>招商中证全指证券公司指数(LOF)A</td>\n",
       "      <td>-2.08</td>\n",
       "      <td>-26.22</td>\n",
       "      <td>162.582308</td>\n",
       "      <td>0.7749</td>\n",
       "      <td>2014-11-13</td>\n",
       "      <td>-4.193225</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1315</th>\n",
       "      <td>股票</td>\n",
       "      <td>161036</td>\n",
       "      <td>富国中证娱乐主题指数增强(LOF)A</td>\n",
       "      <td>-10.57</td>\n",
       "      <td>-25.88</td>\n",
       "      <td>107.770000</td>\n",
       "      <td>0.7412</td>\n",
       "      <td>2017-03-13</td>\n",
       "      <td>-6.089028</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>606</th>\n",
       "      <td>股票</td>\n",
       "      <td>001409</td>\n",
       "      <td>工银互联网加股票</td>\n",
       "      <td>9.06</td>\n",
       "      <td>-25.40</td>\n",
       "      <td>156.906667</td>\n",
       "      <td>0.7460</td>\n",
       "      <td>2015-06-05</td>\n",
       "      <td>-4.381860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>股票</td>\n",
       "      <td>167503</td>\n",
       "      <td>安信中证一带一路主题指数</td>\n",
       "      <td>34.13</td>\n",
       "      <td>-24.94</td>\n",
       "      <td>530.025833</td>\n",
       "      <td>0.8060</td>\n",
       "      <td>2015-05-14</td>\n",
       "      <td>-4.253588</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5637</th>\n",
       "      <td>混合</td>\n",
       "      <td>519651</td>\n",
       "      <td>银河转型混合</td>\n",
       "      <td>-9.18</td>\n",
       "      <td>-24.80</td>\n",
       "      <td>359.350000</td>\n",
       "      <td>0.7520</td>\n",
       "      <td>2015-05-12</td>\n",
       "      <td>-4.223120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1454</th>\n",
       "      <td>股票</td>\n",
       "      <td>010592</td>\n",
       "      <td>南方医药创新股票A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-23.41</td>\n",
       "      <td>59.350000</td>\n",
       "      <td>0.7659</td>\n",
       "      <td>2021-03-02</td>\n",
       "      <td>-28.514729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1408</th>\n",
       "      <td>股票</td>\n",
       "      <td>008709</td>\n",
       "      <td>银河龙头股票</td>\n",
       "      <td>-22.86</td>\n",
       "      <td>-21.71</td>\n",
       "      <td>160.125000</td>\n",
       "      <td>0.7829</td>\n",
       "      <td>2020-08-06</td>\n",
       "      <td>-16.421616</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3832</th>\n",
       "      <td>混合</td>\n",
       "      <td>001184</td>\n",
       "      <td>易方达新常态灵活配置混合</td>\n",
       "      <td>6.65</td>\n",
       "      <td>-21.40</td>\n",
       "      <td>102.344615</td>\n",
       "      <td>0.7860</td>\n",
       "      <td>2015-04-30</td>\n",
       "      <td>-3.562380</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1396</th>\n",
       "      <td>股票</td>\n",
       "      <td>005554</td>\n",
       "      <td>南方H股联接A</td>\n",
       "      <td>-17.93</td>\n",
       "      <td>-21.25</td>\n",
       "      <td>27.186000</td>\n",
       "      <td>0.7875</td>\n",
       "      <td>2018-02-12</td>\n",
       "      <td>-6.021588</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1410</th>\n",
       "      <td>股票</td>\n",
       "      <td>009898</td>\n",
       "      <td>民生加银医药健康股票</td>\n",
       "      <td>-23.54</td>\n",
       "      <td>-21.24</td>\n",
       "      <td>142.605000</td>\n",
       "      <td>0.7876</td>\n",
       "      <td>2020-08-28</td>\n",
       "      <td>-16.730392</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5958</th>\n",
       "      <td>混合</td>\n",
       "      <td>011162</td>\n",
       "      <td>博时港股通领先趋势混合A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-21.22</td>\n",
       "      <td>187.560000</td>\n",
       "      <td>0.7878</td>\n",
       "      <td>2021-02-09</td>\n",
       "      <td>-24.415921</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1446</th>\n",
       "      <td>股票</td>\n",
       "      <td>010204</td>\n",
       "      <td>中银港股通优势成长股票</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-21.00</td>\n",
       "      <td>104.440000</td>\n",
       "      <td>0.79</td>\n",
       "      <td>2021-02-09</td>\n",
       "      <td>-24.168136</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>610</th>\n",
       "      <td>股票</td>\n",
       "      <td>001361</td>\n",
       "      <td>景顺中证科技传媒通信150ETF联接</td>\n",
       "      <td>8.97</td>\n",
       "      <td>-21.00</td>\n",
       "      <td>9.867500</td>\n",
       "      <td>0.79</td>\n",
       "      <td>2015-06-15</td>\n",
       "      <td>-3.554907</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6153</th>\n",
       "      <td>混合</td>\n",
       "      <td>011157</td>\n",
       "      <td>弘毅远方港股通智选领航混合A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-20.47</td>\n",
       "      <td>301.190000</td>\n",
       "      <td>0.7953</td>\n",
       "      <td>2021-02-08</td>\n",
       "      <td>-23.504832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1414</th>\n",
       "      <td>股票</td>\n",
       "      <td>007354</td>\n",
       "      <td>创金合信港股通量化股票A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-20.41</td>\n",
       "      <td>528.400000</td>\n",
       "      <td>0.7959</td>\n",
       "      <td>2021-01-11</td>\n",
       "      <td>-21.734802</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5944</th>\n",
       "      <td>混合</td>\n",
       "      <td>010166</td>\n",
       "      <td>招商兴和优选1年持有期混合</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-20.29</td>\n",
       "      <td>249.720000</td>\n",
       "      <td>0.7971</td>\n",
       "      <td>2021-02-01</td>\n",
       "      <td>-22.854447</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5953</th>\n",
       "      <td>混合</td>\n",
       "      <td>010377</td>\n",
       "      <td>广发价值核心混合A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-20.12</td>\n",
       "      <td>121.350000</td>\n",
       "      <td>0.7988</td>\n",
       "      <td>2021-01-22</td>\n",
       "      <td>-22.059608</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1405</th>\n",
       "      <td>股票</td>\n",
       "      <td>009733</td>\n",
       "      <td>创金合信港股通大消费精选股票A</td>\n",
       "      <td>-22.33</td>\n",
       "      <td>-19.82</td>\n",
       "      <td>181.760000</td>\n",
       "      <td>0.8018</td>\n",
       "      <td>2020-08-27</td>\n",
       "      <td>-15.551600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1269</th>\n",
       "      <td>股票</td>\n",
       "      <td>004642</td>\n",
       "      <td>南方房地产ETF联接A</td>\n",
       "      <td>-8.33</td>\n",
       "      <td>-19.38</td>\n",
       "      <td>90.222857</td>\n",
       "      <td>0.8062</td>\n",
       "      <td>2017-08-24</td>\n",
       "      <td>-4.866769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1172</th>\n",
       "      <td>股票</td>\n",
       "      <td>004752</td>\n",
       "      <td>广发中证传媒ETF联接A</td>\n",
       "      <td>-5.39</td>\n",
       "      <td>-19.20</td>\n",
       "      <td>30.968571</td>\n",
       "      <td>0.8080</td>\n",
       "      <td>2018-01-02</td>\n",
       "      <td>-5.242726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1562</th>\n",
       "      <td>股票</td>\n",
       "      <td>011601</td>\n",
       "      <td>前海开源公共卫生股票A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-19.10</td>\n",
       "      <td>183.250000</td>\n",
       "      <td>0.8090</td>\n",
       "      <td>2021-03-25</td>\n",
       "      <td>-25.155165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>925</th>\n",
       "      <td>股票</td>\n",
       "      <td>160419</td>\n",
       "      <td>华安中证全指证券公司指数</td>\n",
       "      <td>-0.12</td>\n",
       "      <td>-18.47</td>\n",
       "      <td>118.435000</td>\n",
       "      <td>0.8153</td>\n",
       "      <td>2015-06-09</td>\n",
       "      <td>-3.079277</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5832</th>\n",
       "      <td>混合</td>\n",
       "      <td>005477</td>\n",
       "      <td>长安鑫禧灵活配置混合A</td>\n",
       "      <td>-18.20</td>\n",
       "      <td>-18.31</td>\n",
       "      <td>433.244286</td>\n",
       "      <td>0.8169</td>\n",
       "      <td>2018-02-07</td>\n",
       "      <td>-5.104101</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>272</th>\n",
       "      <td>股票</td>\n",
       "      <td>165525</td>\n",
       "      <td>信诚中证基建工程指数(LOF)A</td>\n",
       "      <td>20.95</td>\n",
       "      <td>-18.16</td>\n",
       "      <td>148.177273</td>\n",
       "      <td>0.8196</td>\n",
       "      <td>2015-08-06</td>\n",
       "      <td>-3.097153</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1457</th>\n",
       "      <td>股票</td>\n",
       "      <td>011220</td>\n",
       "      <td>南方匠心优选股票A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-17.88</td>\n",
       "      <td>178.670000</td>\n",
       "      <td>0.8212</td>\n",
       "      <td>2021-02-02</td>\n",
       "      <td>-20.236427</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1344</th>\n",
       "      <td>股票</td>\n",
       "      <td>005659</td>\n",
       "      <td>南方恒指ETF联接C</td>\n",
       "      <td>-12.08</td>\n",
       "      <td>-17.71</td>\n",
       "      <td>9.865000</td>\n",
       "      <td>0.9097</td>\n",
       "      <td>2018-03-09</td>\n",
       "      <td>-5.028417</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>410</th>\n",
       "      <td>股票</td>\n",
       "      <td>001052</td>\n",
       "      <td>华夏中证500ETF联接A</td>\n",
       "      <td>15.56</td>\n",
       "      <td>-17.70</td>\n",
       "      <td>17.163333</td>\n",
       "      <td>0.8230</td>\n",
       "      <td>2015-05-05</td>\n",
       "      <td>-2.897703</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5324</th>\n",
       "      <td>混合</td>\n",
       "      <td>002182</td>\n",
       "      <td>东兴蓝海财富混合</td>\n",
       "      <td>-4.07</td>\n",
       "      <td>-17.60</td>\n",
       "      <td>378.201818</td>\n",
       "      <td>0.8240</td>\n",
       "      <td>2015-12-23</td>\n",
       "      <td>-3.180635</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1030</th>\n",
       "      <td>股票</td>\n",
       "      <td>501305</td>\n",
       "      <td>汇添富中证港股通(LOF)A</td>\n",
       "      <td>-2.00</td>\n",
       "      <td>-17.28</td>\n",
       "      <td>89.647143</td>\n",
       "      <td>0.8272</td>\n",
       "      <td>2017-11-24</td>\n",
       "      <td>-4.558833</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     type    基金代码                基金简称    今年来    成立来    turnover    累计净值  \\\n",
       "1031   股票  164818      工银中证传媒指数(LOF)A  -2.01 -72.25  103.285000  0.2898   \n",
       "720    股票  160639     鹏华中证高铁产业指数(LOF)   5.34 -62.43  210.740833    0.38   \n",
       "744    股票  160135     南方中证高铁产业指数(LOF)   4.80 -54.22   67.665833  1.0137   \n",
       "290    股票  162413          华宝中证1000指数  20.19 -50.22   62.909167  0.4850   \n",
       "538    股票  161123    易方达中证万得并购重组(LOF)  11.27 -45.25  190.600000  0.5358   \n",
       "47     股票  168203     中融国证钢铁行业指数(LOF)  45.16 -42.13  245.194167    1.35   \n",
       "315    股票  164908      交银中证环境治理(LOF)A  18.90 -41.62   75.400000  0.5838   \n",
       "934    股票  165523    信诚中证信息安全指数(LOF)A  -0.32 -39.21   60.851667  0.6175   \n",
       "4839   混合  001239            长盛国企改革混合   1.56 -35.10  390.284167  0.6490   \n",
       "715    股票  502013   长盛中证申万一带一路指数(LOF)   5.39 -34.49   66.969167  1.4976   \n",
       "261    股票  501030        汇添富中证环境治理指数A  21.37 -33.22  161.401111  0.6678   \n",
       "622    股票  165524    信诚中证智能家居指数(LOF)A   8.41 -33.04   75.330833  0.6571   \n",
       "251    股票  160420           华安创业板50指数  21.89 -31.02  141.605000  0.6898   \n",
       "698    股票  161030    富国中证体育产业指数(LOF)A   5.74 -30.46  104.700000  0.6870   \n",
       "1009   股票  161027  富国中证全指证券公司指数(LOF)A  -1.67 -29.34   91.835385  0.6580   \n",
       "1076   股票  001899              东海社会安全  -2.87 -29.00   71.739091    0.71   \n",
       "1370   股票  162412          华宝医疗ETF联接A -13.86 -27.86  104.158333  0.6909   \n",
       "414    股票  001241      国寿安保中证500ETF联接  15.52 -27.68   30.693000  0.7233   \n",
       "1134   股票  160629       鹏华中证传媒指数(LOF)  -4.37 -27.65  163.759231  1.2140   \n",
       "1021   股票  160633               鹏华券商A  -1.89 -27.46  130.608333  0.6790   \n",
       "1400   股票  006816          泰康港股通地产指数A -20.16 -26.95  127.834000  0.7305   \n",
       "1037   股票  161720  招商中证全指证券公司指数(LOF)A  -2.08 -26.22  162.582308  0.7749   \n",
       "1315   股票  161036  富国中证娱乐主题指数增强(LOF)A -10.57 -25.88  107.770000  0.7412   \n",
       "606    股票  001409            工银互联网加股票   9.06 -25.40  156.906667  0.7460   \n",
       "97     股票  167503        安信中证一带一路主题指数  34.13 -24.94  530.025833  0.8060   \n",
       "5637   混合  519651              银河转型混合  -9.18 -24.80  359.350000  0.7520   \n",
       "1454   股票  010592           南方医药创新股票A    NaN -23.41   59.350000  0.7659   \n",
       "1408   股票  008709              银河龙头股票 -22.86 -21.71  160.125000  0.7829   \n",
       "3832   混合  001184        易方达新常态灵活配置混合   6.65 -21.40  102.344615  0.7860   \n",
       "1396   股票  005554             南方H股联接A -17.93 -21.25   27.186000  0.7875   \n",
       "1410   股票  009898          民生加银医药健康股票 -23.54 -21.24  142.605000  0.7876   \n",
       "5958   混合  011162        博时港股通领先趋势混合A    NaN -21.22  187.560000  0.7878   \n",
       "1446   股票  010204         中银港股通优势成长股票    NaN -21.00  104.440000    0.79   \n",
       "610    股票  001361  景顺中证科技传媒通信150ETF联接   8.97 -21.00    9.867500    0.79   \n",
       "6153   混合  011157      弘毅远方港股通智选领航混合A    NaN -20.47  301.190000  0.7953   \n",
       "1414   股票  007354        创金合信港股通量化股票A    NaN -20.41  528.400000  0.7959   \n",
       "5944   混合  010166       招商兴和优选1年持有期混合    NaN -20.29  249.720000  0.7971   \n",
       "5953   混合  010377           广发价值核心混合A    NaN -20.12  121.350000  0.7988   \n",
       "1405   股票  009733     创金合信港股通大消费精选股票A -22.33 -19.82  181.760000  0.8018   \n",
       "1269   股票  004642         南方房地产ETF联接A  -8.33 -19.38   90.222857  0.8062   \n",
       "1172   股票  004752        广发中证传媒ETF联接A  -5.39 -19.20   30.968571  0.8080   \n",
       "1562   股票  011601         前海开源公共卫生股票A    NaN -19.10  183.250000  0.8090   \n",
       "925    股票  160419        华安中证全指证券公司指数  -0.12 -18.47  118.435000  0.8153   \n",
       "5832   混合  005477         长安鑫禧灵活配置混合A -18.20 -18.31  433.244286  0.8169   \n",
       "272    股票  165525    信诚中证基建工程指数(LOF)A  20.95 -18.16  148.177273  0.8196   \n",
       "1457   股票  011220           南方匠心优选股票A    NaN -17.88  178.670000  0.8212   \n",
       "1344   股票  005659          南方恒指ETF联接C -12.08 -17.71    9.865000  0.9097   \n",
       "410    股票  001052       华夏中证500ETF联接A  15.56 -17.70   17.163333  0.8230   \n",
       "5324   混合  002182            东兴蓝海财富混合  -4.07 -17.60  378.201818  0.8240   \n",
       "1030   股票  501305      汇添富中证港股通(LOF)A  -2.00 -17.28   89.647143  0.8272   \n",
       "\n",
       "            成立日期       年化收益  \n",
       "1031  2015-05-21 -17.699954  \n",
       "720   2015-05-27 -13.854522  \n",
       "744   2015-06-10 -11.283484  \n",
       "290   2015-06-04 -10.113271  \n",
       "538   2015-06-03  -8.792745  \n",
       "47    2015-06-19  -8.068979  \n",
       "315   2015-08-13  -8.125463  \n",
       "934   2015-06-26  -7.391246  \n",
       "4839  2015-06-04  -6.394351  \n",
       "715   2015-05-29  -6.245217  \n",
       "261   2016-12-29  -7.803037  \n",
       "622   2015-06-26  -5.999805  \n",
       "251   2015-07-06  -5.590779  \n",
       "698   2015-06-25  -5.447718  \n",
       "1009  2015-03-27  -5.028354  \n",
       "1076  2015-11-23  -5.485033  \n",
       "1370  2015-05-21  -4.841209  \n",
       "414   2015-05-29  -4.820832  \n",
       "1134  2014-12-11  -4.504597  \n",
       "1021  2015-05-06  -4.732382  \n",
       "1400  2019-01-29 -10.313545  \n",
       "1037  2014-11-13  -4.193225  \n",
       "1315  2017-03-13  -6.089028  \n",
       "606   2015-06-05  -4.381860  \n",
       "97    2015-05-14  -4.253588  \n",
       "5637  2015-05-12  -4.223120  \n",
       "1454  2021-03-02 -28.514729  \n",
       "1408  2020-08-06 -16.421616  \n",
       "3832  2015-04-30  -3.562380  \n",
       "1396  2018-02-12  -6.021588  \n",
       "1410  2020-08-28 -16.730392  \n",
       "5958  2021-02-09 -24.415921  \n",
       "1446  2021-02-09 -24.168136  \n",
       "610   2015-06-15  -3.554907  \n",
       "6153  2021-02-08 -23.504832  \n",
       "1414  2021-01-11 -21.734802  \n",
       "5944  2021-02-01 -22.854447  \n",
       "5953  2021-01-22 -22.059608  \n",
       "1405  2020-08-27 -15.551600  \n",
       "1269  2017-08-24  -4.866769  \n",
       "1172  2018-01-02  -5.242726  \n",
       "1562  2021-03-25 -25.155165  \n",
       "925   2015-06-09  -3.079277  \n",
       "5832  2018-02-07  -5.104101  \n",
       "272   2015-08-06  -3.097153  \n",
       "1457  2021-02-02 -20.236427  \n",
       "1344  2018-03-09  -5.028417  \n",
       "410   2015-05-05  -2.897703  \n",
       "5324  2015-12-23  -3.180635  \n",
       "1030  2017-11-24  -4.558833  "
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_rank_remove_AC_simple.sort_values('成立来',ascending=True).head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC_simple=result_rank_remove_AC_simple[~result_rank_remove_AC_simple['turnover'].isnull()]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3923"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(result_rank_remove_AC_simple)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count     50.000000\n",
       "mean     156.958850\n",
       "std      123.899374\n",
       "min        9.865000\n",
       "25%       75.348125\n",
       "50%      124.592000\n",
       "75%      182.877500\n",
       "max      530.025833\n",
       "Name: turnover, dtype: float64"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_rank_remove_AC_simple.sort_values('成立来',ascending=True).head(50)['turnover'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count    3923.000000\n",
       "mean      239.939612\n",
       "std       227.648195\n",
       "min         0.750000\n",
       "25%        88.537222\n",
       "50%       185.725000\n",
       "75%       326.555500\n",
       "max      6135.284444\n",
       "Name: turnover, dtype: float64"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_rank_remove_AC_simple['turnover'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([188., 293., 322., 302., 259., 236., 258., 223., 205., 179., 162.,\n",
       "        150., 142., 121., 111., 101.,  86.,  66.,  63.,  60.,  45.,  41.,\n",
       "         36.,  24.,  23.,  28.,  22.,  24.,  17.,  14.,  15.,  19.,   8.,\n",
       "          4.,   4.,   6.,  13.,   8.,   3.,   5.,   0.,   5.,   6.,   3.,\n",
       "          4.,   2.,   1.,   2.,   1.,   2.]),\n",
       " array([1.10000000e+00, 2.57392400e+01, 5.03784800e+01, 7.50177200e+01,\n",
       "        9.96569600e+01, 1.24296200e+02, 1.48935440e+02, 1.73574680e+02,\n",
       "        1.98213920e+02, 2.22853160e+02, 2.47492400e+02, 2.72131640e+02,\n",
       "        2.96770880e+02, 3.21410120e+02, 3.46049360e+02, 3.70688600e+02,\n",
       "        3.95327840e+02, 4.19967080e+02, 4.44606320e+02, 4.69245560e+02,\n",
       "        4.93884800e+02, 5.18524040e+02, 5.43163280e+02, 5.67802520e+02,\n",
       "        5.92441760e+02, 6.17081000e+02, 6.41720240e+02, 6.66359480e+02,\n",
       "        6.90998720e+02, 7.15637960e+02, 7.40277200e+02, 7.64916440e+02,\n",
       "        7.89555680e+02, 8.14194920e+02, 8.38834160e+02, 8.63473400e+02,\n",
       "        8.88112640e+02, 9.12751880e+02, 9.37391120e+02, 9.62030360e+02,\n",
       "        9.86669600e+02, 1.01130884e+03, 1.03594808e+03, 1.06058732e+03,\n",
       "        1.08522656e+03, 1.10986580e+03, 1.13450504e+03, 1.15914428e+03,\n",
       "        1.18378352e+03, 1.20842276e+03, 1.23306200e+03]),\n",
       " <a list of 50 Patch objects>)"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "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",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.hist(Y1,bins=50,rwidth=0.8,color='red',alpha=0.75)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {},
   "outputs": [],
   "source": [
    "Y = result_rank_remove_AC_simple['turnover'].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {},
   "outputs": [],
   "source": [
    "Y_=sorted(Y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {},
   "outputs": [],
   "source": [
    "Y1=Y_[1:-10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC_simple.sort_values('turnover',ascending=False).head(20).to_excel(\"turnvoer_max.xlsx\",encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>今年来</th>\n",
       "      <th>成立来</th>\n",
       "      <th>turnover</th>\n",
       "      <th>累计净值</th>\n",
       "      <th>成立日期</th>\n",
       "      <th>年化收益</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>3811</th>\n",
       "      <td>混合</td>\n",
       "      <td>003373</td>\n",
       "      <td>大成景禄灵活配置混合A</td>\n",
       "      <td>6.74</td>\n",
       "      <td>52.61</td>\n",
       "      <td>6135.284444</td>\n",
       "      <td>1.5261</td>\n",
       "      <td>2016-09-29</td>\n",
       "      <td>8.436301</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5711</th>\n",
       "      <td>混合</td>\n",
       "      <td>007875</td>\n",
       "      <td>国融融兴混合A</td>\n",
       "      <td>-11.36</td>\n",
       "      <td>18.72</td>\n",
       "      <td>2415.220000</td>\n",
       "      <td>1.1872</td>\n",
       "      <td>2019-11-05</td>\n",
       "      <td>8.439912</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1992</th>\n",
       "      <td>混合</td>\n",
       "      <td>005855</td>\n",
       "      <td>中科沃土沃瑞混合A</td>\n",
       "      <td>50.29</td>\n",
       "      <td>235.41</td>\n",
       "      <td>1995.410000</td>\n",
       "      <td>3.3541</td>\n",
       "      <td>2019-01-14</td>\n",
       "      <td>51.224102</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3471</th>\n",
       "      <td>混合</td>\n",
       "      <td>003238</td>\n",
       "      <td>新华外延增长主题灵活配置混合</td>\n",
       "      <td>8.45</td>\n",
       "      <td>170.67</td>\n",
       "      <td>1666.887778</td>\n",
       "      <td>2.7067</td>\n",
       "      <td>2017-03-02</td>\n",
       "      <td>23.067434</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>224</th>\n",
       "      <td>股票</td>\n",
       "      <td>003646</td>\n",
       "      <td>创金合信中证1000指数增强A</td>\n",
       "      <td>23.32</td>\n",
       "      <td>73.81</td>\n",
       "      <td>1599.192222</td>\n",
       "      <td>1.7381</td>\n",
       "      <td>2016-12-22</td>\n",
       "      <td>11.717297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4306</th>\n",
       "      <td>混合</td>\n",
       "      <td>004557</td>\n",
       "      <td>北信瑞丰鼎丰灵活配置混合</td>\n",
       "      <td>4.78</td>\n",
       "      <td>38.90</td>\n",
       "      <td>1491.363333</td>\n",
       "      <td>1.3890</td>\n",
       "      <td>2019-11-13</td>\n",
       "      <td>16.973287</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2589</th>\n",
       "      <td>混合</td>\n",
       "      <td>001897</td>\n",
       "      <td>九泰久盛量化先锋混合A</td>\n",
       "      <td>20.46</td>\n",
       "      <td>90.83</td>\n",
       "      <td>1396.054545</td>\n",
       "      <td>1.80</td>\n",
       "      <td>2015-11-10</td>\n",
       "      <td>11.161922</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>212</th>\n",
       "      <td>股票</td>\n",
       "      <td>003016</td>\n",
       "      <td>中金中证500A</td>\n",
       "      <td>23.92</td>\n",
       "      <td>89.68</td>\n",
       "      <td>1327.906000</td>\n",
       "      <td>1.8968</td>\n",
       "      <td>2016-07-22</td>\n",
       "      <td>12.565998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>678</th>\n",
       "      <td>股票</td>\n",
       "      <td>900029</td>\n",
       "      <td>中信证券量化优选A</td>\n",
       "      <td>6.44</td>\n",
       "      <td>55.86</td>\n",
       "      <td>1304.910000</td>\n",
       "      <td>2.3413</td>\n",
       "      <td>2020-05-22</td>\n",
       "      <td>32.604347</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4187</th>\n",
       "      <td>混合</td>\n",
       "      <td>005290</td>\n",
       "      <td>诺德新盛灵活配置混合A</td>\n",
       "      <td>5.32</td>\n",
       "      <td>61.84</td>\n",
       "      <td>1301.222857</td>\n",
       "      <td>1.6184</td>\n",
       "      <td>2017-12-20</td>\n",
       "      <td>12.808850</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>125</th>\n",
       "      <td>股票</td>\n",
       "      <td>005313</td>\n",
       "      <td>万家中证1000指数增强A</td>\n",
       "      <td>29.29</td>\n",
       "      <td>129.91</td>\n",
       "      <td>1233.062000</td>\n",
       "      <td>1.9696</td>\n",
       "      <td>2018-01-30</td>\n",
       "      <td>23.917432</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2345</th>\n",
       "      <td>混合</td>\n",
       "      <td>004890</td>\n",
       "      <td>中邮健康文娱混合</td>\n",
       "      <td>27.54</td>\n",
       "      <td>176.58</td>\n",
       "      <td>1219.864286</td>\n",
       "      <td>2.7658</td>\n",
       "      <td>2017-12-13</td>\n",
       "      <td>28.848158</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1952</th>\n",
       "      <td>混合</td>\n",
       "      <td>001569</td>\n",
       "      <td>泰信国策驱动灵活配置混合</td>\n",
       "      <td>57.46</td>\n",
       "      <td>148.00</td>\n",
       "      <td>1189.890833</td>\n",
       "      <td>2.48</td>\n",
       "      <td>2015-10-27</td>\n",
       "      <td>15.928049</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2892</th>\n",
       "      <td>混合</td>\n",
       "      <td>003516</td>\n",
       "      <td>国泰融安多策略灵活配置混合</td>\n",
       "      <td>14.83</td>\n",
       "      <td>270.10</td>\n",
       "      <td>1178.493750</td>\n",
       "      <td>3.7010</td>\n",
       "      <td>2017-07-03</td>\n",
       "      <td>34.096665</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>434</th>\n",
       "      <td>股票</td>\n",
       "      <td>002311</td>\n",
       "      <td>创金合信中证500指数增强A</td>\n",
       "      <td>15.08</td>\n",
       "      <td>56.87</td>\n",
       "      <td>1175.434545</td>\n",
       "      <td>1.5553</td>\n",
       "      <td>2015-12-31</td>\n",
       "      <td>7.837433</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2125</th>\n",
       "      <td>混合</td>\n",
       "      <td>007468</td>\n",
       "      <td>中信建投精选混合A</td>\n",
       "      <td>37.39</td>\n",
       "      <td>118.03</td>\n",
       "      <td>1159.115000</td>\n",
       "      <td>2.1805</td>\n",
       "      <td>2019-11-29</td>\n",
       "      <td>46.205776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1909</th>\n",
       "      <td>混合</td>\n",
       "      <td>700003</td>\n",
       "      <td>平安策略先锋混合</td>\n",
       "      <td>77.61</td>\n",
       "      <td>625.44</td>\n",
       "      <td>1125.081111</td>\n",
       "      <td>6.73</td>\n",
       "      <td>2012-05-29</td>\n",
       "      <td>23.035772</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2239</th>\n",
       "      <td>混合</td>\n",
       "      <td>008347</td>\n",
       "      <td>中信建投甄选混合A</td>\n",
       "      <td>31.33</td>\n",
       "      <td>112.10</td>\n",
       "      <td>1118.505000</td>\n",
       "      <td>2.1210</td>\n",
       "      <td>2019-12-23</td>\n",
       "      <td>46.014618</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>334</th>\n",
       "      <td>股票</td>\n",
       "      <td>006346</td>\n",
       "      <td>安信量化优选股票A</td>\n",
       "      <td>17.91</td>\n",
       "      <td>133.37</td>\n",
       "      <td>1091.676667</td>\n",
       "      <td>2.3337</td>\n",
       "      <td>2018-09-03</td>\n",
       "      <td>29.376029</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2437</th>\n",
       "      <td>混合</td>\n",
       "      <td>001978</td>\n",
       "      <td>泰信互联网+混合</td>\n",
       "      <td>24.23</td>\n",
       "      <td>130.70</td>\n",
       "      <td>1090.443000</td>\n",
       "      <td>2.3070</td>\n",
       "      <td>2016-06-08</td>\n",
       "      <td>16.322894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2100</th>\n",
       "      <td>混合</td>\n",
       "      <td>002669</td>\n",
       "      <td>华商万众创新混合</td>\n",
       "      <td>38.90</td>\n",
       "      <td>216.00</td>\n",
       "      <td>1086.637000</td>\n",
       "      <td>3.16</td>\n",
       "      <td>2016-06-28</td>\n",
       "      <td>23.391197</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2124</th>\n",
       "      <td>混合</td>\n",
       "      <td>002707</td>\n",
       "      <td>大摩科技领先混合</td>\n",
       "      <td>37.39</td>\n",
       "      <td>120.41</td>\n",
       "      <td>1085.390000</td>\n",
       "      <td>2.2041</td>\n",
       "      <td>2017-12-13</td>\n",
       "      <td>21.762895</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5370</th>\n",
       "      <td>混合</td>\n",
       "      <td>000755</td>\n",
       "      <td>富安达新兴成长混合</td>\n",
       "      <td>-4.58</td>\n",
       "      <td>83.05</td>\n",
       "      <td>1076.657143</td>\n",
       "      <td>1.8305</td>\n",
       "      <td>2014-09-11</td>\n",
       "      <td>8.670273</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1431</th>\n",
       "      <td>股票</td>\n",
       "      <td>010253</td>\n",
       "      <td>兴银中证500指数增强A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>16.29</td>\n",
       "      <td>1065.800000</td>\n",
       "      <td>1.1629</td>\n",
       "      <td>2021-03-01</td>\n",
       "      <td>20.839662</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2506</th>\n",
       "      <td>混合</td>\n",
       "      <td>001224</td>\n",
       "      <td>中邮新思路灵活配置混合</td>\n",
       "      <td>22.09</td>\n",
       "      <td>276.90</td>\n",
       "      <td>1063.408182</td>\n",
       "      <td>3.7690</td>\n",
       "      <td>2015-11-11</td>\n",
       "      <td>24.279559</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3378</th>\n",
       "      <td>混合</td>\n",
       "      <td>519097</td>\n",
       "      <td>新华中小市值优选混合</td>\n",
       "      <td>9.14</td>\n",
       "      <td>398.83</td>\n",
       "      <td>1054.095714</td>\n",
       "      <td>4.2544</td>\n",
       "      <td>2011-01-28</td>\n",
       "      <td>15.897110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5364</th>\n",
       "      <td>混合</td>\n",
       "      <td>006274</td>\n",
       "      <td>圆信永丰医药健康</td>\n",
       "      <td>-4.50</td>\n",
       "      <td>48.50</td>\n",
       "      <td>1053.584000</td>\n",
       "      <td>1.4850</td>\n",
       "      <td>2018-11-29</td>\n",
       "      <td>13.832389</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3097</th>\n",
       "      <td>混合</td>\n",
       "      <td>002919</td>\n",
       "      <td>东吴智慧医疗量化混合A</td>\n",
       "      <td>11.84</td>\n",
       "      <td>48.25</td>\n",
       "      <td>1044.617000</td>\n",
       "      <td>1.4825</td>\n",
       "      <td>2016-08-11</td>\n",
       "      <td>7.631943</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2355</th>\n",
       "      <td>混合</td>\n",
       "      <td>002564</td>\n",
       "      <td>新沃通盈灵活配置混合</td>\n",
       "      <td>26.91</td>\n",
       "      <td>220.73</td>\n",
       "      <td>1040.850000</td>\n",
       "      <td>2.7270</td>\n",
       "      <td>2016-09-22</td>\n",
       "      <td>24.917083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5707</th>\n",
       "      <td>混合</td>\n",
       "      <td>002598</td>\n",
       "      <td>平安消费精选混合A</td>\n",
       "      <td>-11.20</td>\n",
       "      <td>6.76</td>\n",
       "      <td>1037.069000</td>\n",
       "      <td>1.0676</td>\n",
       "      <td>2016-06-08</td>\n",
       "      <td>1.190168</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021</th>\n",
       "      <td>混合</td>\n",
       "      <td>519115</td>\n",
       "      <td>浦银安盛红利精选混合A</td>\n",
       "      <td>46.97</td>\n",
       "      <td>358.39</td>\n",
       "      <td>1036.333636</td>\n",
       "      <td>4.5839</td>\n",
       "      <td>2009-12-03</td>\n",
       "      <td>13.472307</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2152</th>\n",
       "      <td>混合</td>\n",
       "      <td>003822</td>\n",
       "      <td>中信建投轮换混合A</td>\n",
       "      <td>36.05</td>\n",
       "      <td>177.93</td>\n",
       "      <td>1035.320000</td>\n",
       "      <td>2.7793</td>\n",
       "      <td>2019-01-17</td>\n",
       "      <td>41.953755</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2377</th>\n",
       "      <td>混合</td>\n",
       "      <td>004374</td>\n",
       "      <td>华泰保兴吉年丰混合发起A</td>\n",
       "      <td>26.14</td>\n",
       "      <td>229.35</td>\n",
       "      <td>1034.878889</td>\n",
       "      <td>3.1251</td>\n",
       "      <td>2017-03-24</td>\n",
       "      <td>28.611546</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2712</th>\n",
       "      <td>混合</td>\n",
       "      <td>003241</td>\n",
       "      <td>创金合信量化发现混合A</td>\n",
       "      <td>18.16</td>\n",
       "      <td>62.76</td>\n",
       "      <td>1021.009000</td>\n",
       "      <td>1.6276</td>\n",
       "      <td>2016-09-27</td>\n",
       "      <td>9.771664</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>173</th>\n",
       "      <td>股票</td>\n",
       "      <td>007831</td>\n",
       "      <td>博道伍佰智航股票A</td>\n",
       "      <td>26.60</td>\n",
       "      <td>71.11</td>\n",
       "      <td>1017.237500</td>\n",
       "      <td>1.7111</td>\n",
       "      <td>2019-09-26</td>\n",
       "      <td>27.271169</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3352</th>\n",
       "      <td>混合</td>\n",
       "      <td>007439</td>\n",
       "      <td>东海科技动力A</td>\n",
       "      <td>9.29</td>\n",
       "      <td>109.89</td>\n",
       "      <td>1013.577500</td>\n",
       "      <td>2.0989</td>\n",
       "      <td>2019-06-26</td>\n",
       "      <td>34.854075</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1421</th>\n",
       "      <td>股票</td>\n",
       "      <td>011229</td>\n",
       "      <td>创金合信数字经济主题股票A</td>\n",
       "      <td>NaN</td>\n",
       "      <td>64.44</td>\n",
       "      <td>985.200000</td>\n",
       "      <td>1.6444</td>\n",
       "      <td>2021-01-20</td>\n",
       "      <td>73.059541</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1028</th>\n",
       "      <td>股票</td>\n",
       "      <td>003015</td>\n",
       "      <td>中金沪深300A</td>\n",
       "      <td>-1.98</td>\n",
       "      <td>89.84</td>\n",
       "      <td>975.129000</td>\n",
       "      <td>1.8984</td>\n",
       "      <td>2016-07-22</td>\n",
       "      <td>12.583549</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>515</th>\n",
       "      <td>股票</td>\n",
       "      <td>005328</td>\n",
       "      <td>前海开源价值策略股票</td>\n",
       "      <td>12.30</td>\n",
       "      <td>69.98</td>\n",
       "      <td>971.194286</td>\n",
       "      <td>1.6998</td>\n",
       "      <td>2017-12-22</td>\n",
       "      <td>14.224087</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2935</th>\n",
       "      <td>混合</td>\n",
       "      <td>005443</td>\n",
       "      <td>国金量化多策略混合</td>\n",
       "      <td>14.27</td>\n",
       "      <td>12.74</td>\n",
       "      <td>967.264286</td>\n",
       "      <td>1.1274</td>\n",
       "      <td>2018-02-01</td>\n",
       "      <td>3.141527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>504</th>\n",
       "      <td>股票</td>\n",
       "      <td>000594</td>\n",
       "      <td>大摩进取优选股票</td>\n",
       "      <td>12.73</td>\n",
       "      <td>229.50</td>\n",
       "      <td>963.646429</td>\n",
       "      <td>3.2950</td>\n",
       "      <td>2014-05-29</td>\n",
       "      <td>17.087174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2714</th>\n",
       "      <td>混合</td>\n",
       "      <td>001839</td>\n",
       "      <td>九泰久兴灵活配置混合</td>\n",
       "      <td>18.14</td>\n",
       "      <td>94.91</td>\n",
       "      <td>956.521111</td>\n",
       "      <td>1.8310</td>\n",
       "      <td>2017-01-20</td>\n",
       "      <td>14.560340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>379</th>\n",
       "      <td>股票</td>\n",
       "      <td>006195</td>\n",
       "      <td>国金量化多因子</td>\n",
       "      <td>16.21</td>\n",
       "      <td>61.18</td>\n",
       "      <td>951.036667</td>\n",
       "      <td>1.6118</td>\n",
       "      <td>2018-10-31</td>\n",
       "      <td>16.466688</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>股票</td>\n",
       "      <td>006593</td>\n",
       "      <td>博道中证500增强A</td>\n",
       "      <td>32.83</td>\n",
       "      <td>144.05</td>\n",
       "      <td>947.082000</td>\n",
       "      <td>2.3419</td>\n",
       "      <td>2019-01-03</td>\n",
       "      <td>35.230562</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3703</th>\n",
       "      <td>混合</td>\n",
       "      <td>006157</td>\n",
       "      <td>财通量化核心优选混合</td>\n",
       "      <td>7.20</td>\n",
       "      <td>83.11</td>\n",
       "      <td>937.283333</td>\n",
       "      <td>1.8311</td>\n",
       "      <td>2018-09-17</td>\n",
       "      <td>20.443511</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2132</th>\n",
       "      <td>混合</td>\n",
       "      <td>004895</td>\n",
       "      <td>华商鑫安灵活混合</td>\n",
       "      <td>37.05</td>\n",
       "      <td>201.56</td>\n",
       "      <td>933.116250</td>\n",
       "      <td>2.8080</td>\n",
       "      <td>2017-09-06</td>\n",
       "      <td>29.403458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4204</th>\n",
       "      <td>混合</td>\n",
       "      <td>690003</td>\n",
       "      <td>民生加银精选混合</td>\n",
       "      <td>5.24</td>\n",
       "      <td>8.40</td>\n",
       "      <td>928.610870</td>\n",
       "      <td>1.0840</td>\n",
       "      <td>2010-02-03</td>\n",
       "      <td>0.681438</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4715</th>\n",
       "      <td>混合</td>\n",
       "      <td>009486</td>\n",
       "      <td>光大瑞和混合A</td>\n",
       "      <td>2.54</td>\n",
       "      <td>15.73</td>\n",
       "      <td>923.305000</td>\n",
       "      <td>1.1573</td>\n",
       "      <td>2020-06-29</td>\n",
       "      <td>10.459939</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5026</th>\n",
       "      <td>混合</td>\n",
       "      <td>100060</td>\n",
       "      <td>富国高新技术产业混合</td>\n",
       "      <td>-0.28</td>\n",
       "      <td>539.41</td>\n",
       "      <td>922.715000</td>\n",
       "      <td>5.2350</td>\n",
       "      <td>2012-06-27</td>\n",
       "      <td>21.619368</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5414</th>\n",
       "      <td>混合</td>\n",
       "      <td>001972</td>\n",
       "      <td>前海开源沪港深智慧生活混合</td>\n",
       "      <td>-5.16</td>\n",
       "      <td>80.30</td>\n",
       "      <td>921.032727</td>\n",
       "      <td>1.8030</td>\n",
       "      <td>2016-01-26</td>\n",
       "      <td>10.514522</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     type    基金代码             基金简称    今年来     成立来     turnover    累计净值  \\\n",
       "3811   混合  003373      大成景禄灵活配置混合A   6.74   52.61  6135.284444  1.5261   \n",
       "5711   混合  007875          国融融兴混合A -11.36   18.72  2415.220000  1.1872   \n",
       "1992   混合  005855        中科沃土沃瑞混合A  50.29  235.41  1995.410000  3.3541   \n",
       "3471   混合  003238   新华外延增长主题灵活配置混合   8.45  170.67  1666.887778  2.7067   \n",
       "224    股票  003646  创金合信中证1000指数增强A  23.32   73.81  1599.192222  1.7381   \n",
       "4306   混合  004557     北信瑞丰鼎丰灵活配置混合   4.78   38.90  1491.363333  1.3890   \n",
       "2589   混合  001897      九泰久盛量化先锋混合A  20.46   90.83  1396.054545    1.80   \n",
       "212    股票  003016         中金中证500A  23.92   89.68  1327.906000  1.8968   \n",
       "678    股票  900029        中信证券量化优选A   6.44   55.86  1304.910000  2.3413   \n",
       "4187   混合  005290      诺德新盛灵活配置混合A   5.32   61.84  1301.222857  1.6184   \n",
       "125    股票  005313    万家中证1000指数增强A  29.29  129.91  1233.062000  1.9696   \n",
       "2345   混合  004890         中邮健康文娱混合  27.54  176.58  1219.864286  2.7658   \n",
       "1952   混合  001569     泰信国策驱动灵活配置混合  57.46  148.00  1189.890833    2.48   \n",
       "2892   混合  003516    国泰融安多策略灵活配置混合  14.83  270.10  1178.493750  3.7010   \n",
       "434    股票  002311   创金合信中证500指数增强A  15.08   56.87  1175.434545  1.5553   \n",
       "2125   混合  007468        中信建投精选混合A  37.39  118.03  1159.115000  2.1805   \n",
       "1909   混合  700003         平安策略先锋混合  77.61  625.44  1125.081111    6.73   \n",
       "2239   混合  008347        中信建投甄选混合A  31.33  112.10  1118.505000  2.1210   \n",
       "334    股票  006346        安信量化优选股票A  17.91  133.37  1091.676667  2.3337   \n",
       "2437   混合  001978         泰信互联网+混合  24.23  130.70  1090.443000  2.3070   \n",
       "2100   混合  002669         华商万众创新混合  38.90  216.00  1086.637000    3.16   \n",
       "2124   混合  002707         大摩科技领先混合  37.39  120.41  1085.390000  2.2041   \n",
       "5370   混合  000755        富安达新兴成长混合  -4.58   83.05  1076.657143  1.8305   \n",
       "1431   股票  010253     兴银中证500指数增强A    NaN   16.29  1065.800000  1.1629   \n",
       "2506   混合  001224      中邮新思路灵活配置混合  22.09  276.90  1063.408182  3.7690   \n",
       "3378   混合  519097       新华中小市值优选混合   9.14  398.83  1054.095714  4.2544   \n",
       "5364   混合  006274         圆信永丰医药健康  -4.50   48.50  1053.584000  1.4850   \n",
       "3097   混合  002919      东吴智慧医疗量化混合A  11.84   48.25  1044.617000  1.4825   \n",
       "2355   混合  002564       新沃通盈灵活配置混合  26.91  220.73  1040.850000  2.7270   \n",
       "5707   混合  002598        平安消费精选混合A -11.20    6.76  1037.069000  1.0676   \n",
       "2021   混合  519115      浦银安盛红利精选混合A  46.97  358.39  1036.333636  4.5839   \n",
       "2152   混合  003822        中信建投轮换混合A  36.05  177.93  1035.320000  2.7793   \n",
       "2377   混合  004374     华泰保兴吉年丰混合发起A  26.14  229.35  1034.878889  3.1251   \n",
       "2712   混合  003241      创金合信量化发现混合A  18.16   62.76  1021.009000  1.6276   \n",
       "173    股票  007831        博道伍佰智航股票A  26.60   71.11  1017.237500  1.7111   \n",
       "3352   混合  007439          东海科技动力A   9.29  109.89  1013.577500  2.0989   \n",
       "1421   股票  011229    创金合信数字经济主题股票A    NaN   64.44   985.200000  1.6444   \n",
       "1028   股票  003015         中金沪深300A  -1.98   89.84   975.129000  1.8984   \n",
       "515    股票  005328       前海开源价值策略股票  12.30   69.98   971.194286  1.6998   \n",
       "2935   混合  005443        国金量化多策略混合  14.27   12.74   967.264286  1.1274   \n",
       "504    股票  000594         大摩进取优选股票  12.73  229.50   963.646429  3.2950   \n",
       "2714   混合  001839       九泰久兴灵活配置混合  18.14   94.91   956.521111  1.8310   \n",
       "379    股票  006195          国金量化多因子  16.21   61.18   951.036667  1.6118   \n",
       "100    股票  006593       博道中证500增强A  32.83  144.05   947.082000  2.3419   \n",
       "3703   混合  006157       财通量化核心优选混合   7.20   83.11   937.283333  1.8311   \n",
       "2132   混合  004895         华商鑫安灵活混合  37.05  201.56   933.116250  2.8080   \n",
       "4204   混合  690003         民生加银精选混合   5.24    8.40   928.610870  1.0840   \n",
       "4715   混合  009486          光大瑞和混合A   2.54   15.73   923.305000  1.1573   \n",
       "5026   混合  100060       富国高新技术产业混合  -0.28  539.41   922.715000  5.2350   \n",
       "5414   混合  001972    前海开源沪港深智慧生活混合  -5.16   80.30   921.032727  1.8030   \n",
       "\n",
       "            成立日期       年化收益  \n",
       "3811  2016-09-29   8.436301  \n",
       "5711  2019-11-05   8.439912  \n",
       "1992  2019-01-14  51.224102  \n",
       "3471  2017-03-02  23.067434  \n",
       "224   2016-12-22  11.717297  \n",
       "4306  2019-11-13  16.973287  \n",
       "2589  2015-11-10  11.161922  \n",
       "212   2016-07-22  12.565998  \n",
       "678   2020-05-22  32.604347  \n",
       "4187  2017-12-20  12.808850  \n",
       "125   2018-01-30  23.917432  \n",
       "2345  2017-12-13  28.848158  \n",
       "1952  2015-10-27  15.928049  \n",
       "2892  2017-07-03  34.096665  \n",
       "434   2015-12-31   7.837433  \n",
       "2125  2019-11-29  46.205776  \n",
       "1909  2012-05-29  23.035772  \n",
       "2239  2019-12-23  46.014618  \n",
       "334   2018-09-03  29.376029  \n",
       "2437  2016-06-08  16.322894  \n",
       "2100  2016-06-28  23.391197  \n",
       "2124  2017-12-13  21.762895  \n",
       "5370  2014-09-11   8.670273  \n",
       "1431  2021-03-01  20.839662  \n",
       "2506  2015-11-11  24.279559  \n",
       "3378  2011-01-28  15.897110  \n",
       "5364  2018-11-29  13.832389  \n",
       "3097  2016-08-11   7.631943  \n",
       "2355  2016-09-22  24.917083  \n",
       "5707  2016-06-08   1.190168  \n",
       "2021  2009-12-03  13.472307  \n",
       "2152  2019-01-17  41.953755  \n",
       "2377  2017-03-24  28.611546  \n",
       "2712  2016-09-27   9.771664  \n",
       "173   2019-09-26  27.271169  \n",
       "3352  2019-06-26  34.854075  \n",
       "1421  2021-01-20  73.059541  \n",
       "1028  2016-07-22  12.583549  \n",
       "515   2017-12-22  14.224087  \n",
       "2935  2018-02-01   3.141527  \n",
       "504   2014-05-29  17.087174  \n",
       "2714  2017-01-20  14.560340  \n",
       "379   2018-10-31  16.466688  \n",
       "100   2019-01-03  35.230562  \n",
       "3703  2018-09-17  20.443511  \n",
       "2132  2017-09-06  29.403458  \n",
       "4204  2010-02-03   0.681438  \n",
       "4715  2020-06-29  10.459939  \n",
       "5026  2012-06-27  21.619368  \n",
       "5414  2016-01-26  10.514522  "
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_rank_remove_AC_simple.sort_values('turnover',ascending=False).head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.merge(result_rank_remove_AC_simple,result_rank_remove_AC,how='inner',left_on='基金代码',right_on='基金代码')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_excel(\"all_fund.xlsx\",encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_rank_remove_AC_simple.to_excel(\"all_fund.xlsx\",encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "513dc2e41d739bb2c947903f3c0bbf636d03aa53ab50e61c694a27481c81805e"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
